mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 10:24:23 +01:00
feat(widgets): toggle from label
This commit is contained in:
parent
f18ac3a923
commit
e0f7d65f77
@ -139,7 +139,10 @@ export function FormListToggleableItem({ title, currentValue, onChange, ...props
|
||||
onChange(newValue: boolean): void;
|
||||
}) {
|
||||
return (
|
||||
<FormListItem {...props} onClick={(e) => e.stopPropagation()}>
|
||||
<FormListItem {...props} onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onChange(!currentValue);
|
||||
}}>
|
||||
<FormToggle
|
||||
switchOnName={title} switchOffName={title}
|
||||
currentValue={currentValue}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user