import { Trophy } from 'lucide-react'; import { ReactNode } from 'react'; import { Avatar } from './Avatar'; import { Box } from './Box'; import { Heading } from './Heading'; import { Icon } from './Icon'; import { Text } from './Text'; export interface PodiumEntry { name: string; avatar?: string; value: string | number; position: 1 | 2 | 3; } export interface PodiumProps { entries?: PodiumEntry[]; title?: string; children?: ReactNode; } export const Podium = ({ entries = [], title, children }: PodiumProps) => { const sortedEntries = [...entries].sort((a, b) => { const order = { 2: 0, 1: 1, 3: 2 }; return order[a.position] - order[b.position]; }); const getPositionColor = (pos: number) => { if (pos === 1) return 'var(--ui-color-intent-warning)'; if (pos === 2) return '#A1A1AA'; if (pos === 3) return '#CD7F32'; return 'var(--ui-color-text-low)'; }; return ( {title && {title}} {sortedEntries.map((entry) => { const height = entry.position === 1 ? '12rem' : entry.position === 2 ? '10rem' : '8rem'; const color = getPositionColor(entry.position); return ( {entry.position === 1 && } {entry.name} {entry.value} {entry.position} ); })} {children} ); }; export const PodiumItem = ({ children }: { children: ReactNode }) => <>{children};