import { useState } from 'react'; import { Plus } from 'lucide-react'; interface AddOptionProps { onAdd: (text: string) => void; } export function AddOption({ onAdd }: AddOptionProps) { const [text, setText] = useState(''); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); if (text.trim()) { onAdd(text); setText(''); } }; return (
setText(e.target.value)} placeholder="Add a new option..." className="flex-1 px-4 py-3 rounded-lg bg-white/10 border border-white/20 text-white placeholder-white/50 focus:outline-none focus:ring-2 focus:ring-white/30" />
); }