Files
thrilltrack-explorer/src-old/components/ui/speed-display.tsx

52 lines
1.1 KiB
TypeScript

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}
/>
);
}