'use client' import { useState } from 'react' import { Button } from './button' import { Popover, PopoverContent, PopoverTrigger } from './popover' import { cn } from '../lib/utils' import { ColorPalette } from './color-palette' type ColorPickerProps = { value?: string onChange?: (value: string) => void showColor?: boolean className?: string style?: React.CSSProperties } export function ColorPicker({ value, onChange, showColor = true, className, style }: ColorPickerProps) { const [open, setOpen] = useState(false) return ( { onChange?.(colorSelected) if (!fromColorPicker) { setOpen(false) } }} /> ) }