'use client'; import { useState } from 'react'; import { X, Image } from 'lucide-react'; interface NewImageDialogProps { isOpen: boolean; onClose: () => void; onCreate: (width: number, height: number, backgroundColor: string) => void; } const PRESETS = [ { name: 'Custom', width: 800, height: 600 }, { name: '1920×1080 (Full HD)', width: 1920, height: 1080 }, { name: '1280×720 (HD)', width: 1280, height: 720 }, { name: '800×600', width: 800, height: 600 }, { name: '640×480', width: 640, height: 480 }, ]; export function NewImageDialog({ isOpen, onClose, onCreate }: NewImageDialogProps) { const [width, setWidth] = useState(800); const [height, setHeight] = useState(600); const [backgroundColor, setBackgroundColor] = useState('#ffffff'); if (!isOpen) return null; const handleCreate = () => { onCreate(width, height, backgroundColor); onClose(); }; return (
e.stopPropagation()} > {/* Header */}

New Image

{/* Content */}
{/* Presets */}
{/* Dimensions */}
setWidth(Number(e.target.value))} className="w-full px-3 py-2 rounded-md border border-border bg-background text-foreground" />
setHeight(Number(e.target.value))} className="w-full px-3 py-2 rounded-md border border-border bg-background text-foreground" />
{/* Background Color */}
setBackgroundColor(e.target.value)} className="w-20 h-10 rounded-md border border-border cursor-pointer" /> setBackgroundColor(e.target.value)} className="flex-1 px-3 py-2 rounded-md border border-border bg-background text-foreground font-mono uppercase" />
{/* Footer */}
); }