mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 20:51:17 -05:00
Refactor code structure and remove redundant changes
This commit is contained in:
52
src-old/components/ui/speed-display.tsx
Normal file
52
src-old/components/ui/speed-display.tsx
Normal 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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user