website refactor
This commit is contained in:
28
apps/website/components/races/RaceSummaryItem.tsx
Normal file
28
apps/website/components/races/RaceSummaryItem.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
|
||||
interface RaceSummaryItemProps {
|
||||
track: string;
|
||||
meta: string;
|
||||
date: Date;
|
||||
}
|
||||
|
||||
export function RaceSummaryItem({ track, meta, date }: RaceSummaryItemProps) {
|
||||
return (
|
||||
<Box display="flex" justifyContent="between" gap={3}>
|
||||
<Box flexGrow={1} minWidth="0">
|
||||
<Text size="xs" color="text-white" block truncate>{track}</Text>
|
||||
<Text size="xs" color="text-gray-400" block truncate>{meta}</Text>
|
||||
</Box>
|
||||
<Box textAlign="right">
|
||||
<Text size="xs" color="text-gray-500" className="whitespace-nowrap">
|
||||
{date.toLocaleDateString(undefined, {
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
})}
|
||||
</Text>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user