'use client';
import { Plus, X } from 'lucide-react';
import { DEFAULT_PALETTE } from '@/lib/color-utils';
import { cn } from '@/lib/utils';
interface ColorSwatchesProps {
onColorSelect: (color: string) => void;
currentColor: string;
customSwatches?: string[];
onAddSwatch?: (color: string) => void;
onRemoveSwatch?: (color: string) => void;
}
export function ColorSwatches({
onColorSelect,
currentColor,
customSwatches = [],
onAddSwatch,
onRemoveSwatch,
}: ColorSwatchesProps) {
return (
{/* Default palette */}
Default Colors
{DEFAULT_PALETTE.map((color) => (
{/* Custom swatches */}
{(customSwatches.length > 0 || onAddSwatch) && (
Custom
{onAddSwatch && (
)}
{customSwatches.length > 0 ? (
{customSwatches.map((color) => (
))}
) : (
No custom swatches yet
)}
)}
);
}