mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 13:56:11 +01:00
feat(react): port sort child notes
This commit is contained in:
23
apps/client/src/widgets/react/FormCheckbox.tsx
Normal file
23
apps/client/src/widgets/react/FormCheckbox.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
interface FormCheckboxProps {
|
||||
name: string;
|
||||
label: string;
|
||||
currentValue?: boolean;
|
||||
onChange(newValue: boolean): void;
|
||||
}
|
||||
|
||||
export default function FormCheckbox({ name, label, currentValue, onChange }: FormCheckboxProps) {
|
||||
return (
|
||||
<div className="form-check">
|
||||
<label className="form-check-label tn-checkbox">
|
||||
<input
|
||||
className="form-check-input"
|
||||
type="checkbox"
|
||||
name={name}
|
||||
checked={currentValue || false}
|
||||
value="1"
|
||||
onChange={e => onChange((e.target as HTMLInputElement).checked)} />
|
||||
{label}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user