Skip to content

Commit 0326173

Browse files
committed
refactor: update handleVariantChange to use Variant type from variant-store for improved type safety
1 parent 940a706 commit 0326173

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

components/variant-select.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
88
import { Skeleton } from "@/components/ui/skeleton";
99

1010
import { cn } from "@/lib/utils";
11-
import { useVariantStore } from "@/lib/variant-store";
12-
import { type ComponentLibrary } from "@/lib/variant-utils";
11+
import { useVariantStore, type Variant } from "@/lib/variant-store";
1312

1413
type VariantSelectProps = {
1514
size?: "sm" | "default";
@@ -23,7 +22,7 @@ export default function VariantSelect({ size = "default" }: VariantSelectProps)
2322
setIsHydrated(true);
2423
}, []);
2524

26-
const handleVariantChange = (value: ComponentLibrary) => {
25+
const handleVariantChange = (value: Variant) => {
2726
try {
2827
setVariant(value);
2928
posthog.capture("variant_change", { to: value });

0 commit comments

Comments
 (0)