mirror of
https://github.com/zadam/trilium.git
synced 2025-12-12 18:34:24 +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;
|
onChange(newValue: boolean): void;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<FormListItem {...props} onClick={(e) => e.stopPropagation()}>
|
<FormListItem {...props} onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
onChange(!currentValue);
|
||||||
|
}}>
|
||||||
<FormToggle
|
<FormToggle
|
||||||
switchOnName={title} switchOffName={title}
|
switchOnName={title} switchOffName={title}
|
||||||
currentValue={currentValue}
|
currentValue={currentValue}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user