import type { ReactNode } from 'react'; import { Link } from 'react-router'; import { cva } from 'class-variance-authority'; import { Text } from '~/components/ui/text'; const linkVariants = cva('flex items-center rounded-item text-sm transition-colors duration-150', { variants: { size: { nav: 'h-[34px] gap-2.5 px-2.5 font-medium', client: 'h-9 gap-2.5 px-2', }, active: { true: 'bg-surface-hover text-text-primary', false: 'text-text-secondary hover:bg-surface-hover-subtle hover:text-text-primary', }, }, }); interface SidebarLinkProps { to: string; label: string; active: boolean; size: 'nav' | 'client'; leading?: ReactNode; count?: number; onNavigate?: () => void; } export function SidebarLink({ to, label, active, size, leading, count, onNavigate }: SidebarLinkProps) { return ( {leading} {label} {count !== undefined && ( {count} )} ); }