import { cn } from '@/lib/cn' import { CATEGORY_LABELS, PLANT_CATEGORIES, type CategoryFilter } from '@/lib/plants' /** * Horizontal, scrollable "All + each category" chip row. Shared by the /plants * page and the PlantPicker so both filter the catalog identically. */ export function CategoryChips({ value, onChange, size = 'md', }: { value: CategoryFilter onChange: (c: CategoryFilter) => void size?: 'sm' | 'md' }) { const chip = (v: CategoryFilter, label: string) => ( ) return (
{chip('all', 'All')} {PLANT_CATEGORIES.map((c) => chip(c, CATEGORY_LABELS[c]))}
) }