import { motion, useReducedMotion } from "motion/react"; import type { CSSProperties, ReactNode } from "react"; import { aceternityMotion } from "@/lib/aceternity-motion"; import { canvasThemes } from "@/lib/canvas-theme"; import { cn } from "@/lib/utils"; import { useThemeStore } from "@/stores/use-theme-store"; export type CanvasCreateCommand = { id: string; label: string; icon: ReactNode; badge?: string; onClick: () => void; }; export function CanvasCreateCommandGrid({ commands, variant = "node" }: { commands: CanvasCreateCommand[]; variant?: "node" | "resource" }) { const theme = canvasThemes[useThemeStore((state) => state.theme)]; const reducedMotion = useReducedMotion(); return (
{commands.map((command) => ( event.stopPropagation()} onClick={command.onClick} > {command.icon} {command.label} {command.badge ? {command.badge} : null} ))}
); }