feat: add filter chip

This commit is contained in:
rajun 2026-10-27 16:28:55 +05:30
parent 7dea0dace0
commit 57c337e0a9

View File

@ -0,0 +1,18 @@
import type { ReactNode } from 'react';
import { Link } from 'react-router';
import { cn } from '~/lib/utils';
export function FilterChip({ to, selected, children }: { to: string; selected: boolean; children: ReactNode }) {
return (
<Link
to={to}
aria-current={selected ? 'page' : undefined}
className={cn(
'flex h-[30px] items-center rounded-full px-3 text-xs font-medium ring-1 ring-inset transition-colors',
selected ? 'bg-text-primary text-background ring-text-primary' : 'text-text-secondary ring-border-control hover:text-text-primary',
)}
>
{children}
</Link>
);
}