From 7e8517ff3ef1a3812bdbfbcde7eaedd18f01b6c7 Mon Sep 17 00:00:00 2001 From: Vula Builder Date: Fri, 31 Jul 2026 18:44:28 +0000 Subject: [PATCH] Deploy --- src/components/shop/ProductSort.tsx | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/components/shop/ProductSort.tsx diff --git a/src/components/shop/ProductSort.tsx b/src/components/shop/ProductSort.tsx new file mode 100644 index 0000000..ed83d52 --- /dev/null +++ b/src/components/shop/ProductSort.tsx @@ -0,0 +1,40 @@ +'use client' +import { ArrowUpDown } from 'lucide-react' + +export type SortOption = 'featured' | 'price-asc' | 'price-desc' | 'newest' | 'name-asc' + +interface ProductSortProps { + value: SortOption + onChange: (v: SortOption) => void + count: number +} + +const SORT_LABELS: Record = { + featured: 'Featured', + 'price-asc': 'Price: Low to High', + 'price-desc': 'Price: High to Low', + newest: 'Newest', + 'name-asc': 'Name: A–Z', +} + +export default function ProductSort({ value, onChange, count }: ProductSortProps) { + return ( +
+

+ {count} product{count !== 1 ? 's' : ''} +

+
+ + +
+
+ ) +}