Fix unit display errors

This commit is contained in:
gpt-engineer-app[bot]
2025-09-28 22:51:44 +00:00
parent 8f13796567
commit a6e9d77bda
5 changed files with 114 additions and 4 deletions

View File

@@ -0,0 +1,52 @@
import { MeasurementDisplay } from './measurement-display';
interface SpeedDisplayProps {
kmh: number;
showBothUnits?: boolean;
className?: string;
}
export function SpeedDisplay({ kmh, showBothUnits = false, className }: SpeedDisplayProps) {
return (
<MeasurementDisplay
value={kmh}
type="speed"
showBothUnits={showBothUnits}
className={className}
/>
);
}
interface DistanceDisplayProps {
meters: number;
showBothUnits?: boolean;
className?: string;
}
export function DistanceDisplay({ meters, showBothUnits = false, className }: DistanceDisplayProps) {
return (
<MeasurementDisplay
value={meters}
type="distance"
showBothUnits={showBothUnits}
className={className}
/>
);
}
interface HeightDisplayProps {
cm: number;
showBothUnits?: boolean;
className?: string;
}
export function HeightDisplay({ cm, showBothUnits = false, className }: HeightDisplayProps) {
return (
<MeasurementDisplay
value={cm}
type="height"
showBothUnits={showBothUnits}
className={className}
/>
);
}