import { useState } from 'react'; interface CreateChecklistModalProps { onSave: (name: string) => Promise; onClose: () => void; } export function CreateChecklistModal({ onSave, onClose }: CreateChecklistModalProps) { const [name, setName] = useState(''); const handleSubmit = async (e: React.FormEvent) => { e.preventDefault(); if (!name.trim()) return; const success = await onSave(name); if (success) { onClose(); } }; return (

Add Checklist

setName(e.target.value)} className="w-full bg-gray-700 text-white rounded-lg p-3 border border-gray-600 focus:border-blue-500 focus:outline-none" placeholder="Checklist title..." autoFocus />
); }