feat(react/dialogs): port delete_notes

This commit is contained in:
Elian Doran
2025-08-05 18:05:41 +03:00
parent a4e6a964c9
commit 87d9ea06f3
13 changed files with 214 additions and 216 deletions

View File

@@ -6,10 +6,11 @@ interface FormCheckboxProps {
*/
hint?: string;
currentValue: boolean;
disabled?: boolean;
onChange(newValue: boolean): void;
}
export default function FormCheckbox({ name, label, currentValue, onChange, hint }: FormCheckboxProps) {
export default function FormCheckbox({ name, disabled, label, currentValue, onChange, hint }: FormCheckboxProps) {
return (
<div className="form-checkbox">
<label
@@ -21,6 +22,7 @@ export default function FormCheckbox({ name, label, currentValue, onChange, hint
name={name}
checked={currentValue || false}
value="1"
disabled={disabled}
onChange={e => onChange((e.target as HTMLInputElement).checked)} />
{label}
</label>