import '../styles/styles.css' import ReactQuill from 'react-quill' import '../styles/customQuillStyles.css' import React from 'react' const editorFormats = [ 'header', 'font', 'size', 'bold', 'italic', 'underline', 'strike', 'blockquote', 'list', 'bullet', 'indent', 'link' ] const editorModules = { toolbar: [ [{ header: '1' }, { header: '2' }, { font: [] }], [{ size: [] }], ['bold', 'italic', 'underline', 'strike', 'blockquote'], [ { list: 'ordered' }, { list: 'bullet' }, { indent: '-1' }, { indent: '+1' } ], ['link'] ] } interface InputFieldProps { label: string description?: string type?: 'text' | 'textarea' | 'richtext' placeholder: string name: string inputMode?: 'url' value: string onChange: (name: string, value: string) => void } export const InputField = React.memo( ({ label, description, type = 'text', placeholder, name, inputMode, value, onChange }: InputFieldProps) => { const handleChange = ( e: React.ChangeEvent ) => { onChange(name, e.target.value) } return (
{description &&

{description}

} {type === 'textarea' ? ( ) : type === 'richtext' ? ( onChange(name, content)} /> ) : ( )}
) } ) interface CheckboxFieldProps { label: string name: string isChecked: boolean handleChange: (e: React.ChangeEvent) => void } export const CheckboxField = React.memo( ({ label, name, isChecked, handleChange }: CheckboxFieldProps) => (
) )