"use client"; import { AnimatePresence, motion } from "motion/react"; import { GUIDE_REGISTRY, getGuideById } from "@/guides"; import { usePreviewStore } from "@/preview/preview-store"; import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; import { Label } from "@/components/ui/label"; import { Separator } from "@/components/ui/separator"; import { cn } from "@/utils/ui"; export function GridPopover({ children }: { children: React.ReactNode }) { const activeGuide = usePreviewStore((state) => state.activeGuide); const toggleGuide = usePreviewStore((state) => state.toggleGuide); const activeGuideDef = getGuideById(activeGuide); const options = activeGuideDef?.renderOptions?.(); return ( {children}
{GUIDE_REGISTRY.map((guide) => ( toggleGuide(guide.id)} /> ))}
{options && (
{options}
)}
); } function GridItem({ label, preview, isSelected, onClick, }: { label: string; preview: React.ReactNode; isSelected?: boolean; onClick: () => void; }) { return ( ); }