import { Input } from '@/components/ui/input' import { ElementDefinition } from '@/lib/element-registry' import { Calendar } from 'lucide-react' interface DateConfig { required?: boolean targetCells: any[] } export const dateDefinition: ElementDefinition = { type: 'date', label: 'Дата', icon: , defaultConfig: { required: false, targetCells: [], }, Editor: ({ config, onChange }) => (
onChange({ ...config, required: e.target.checked })} />
), Preview: () => (
Предпросмотр
), Render: ({ config, value, onChange }) => ( onChange?.(e.target.value)} required={config.required} /> ), }