fix: make widget toggle cards clickable

This commit is contained in:
ajnart committed 2026-08-23 01:19:09 +02:00
1 parent 93d160aebd
commit 14cc3e8a44
2 files changed
+12 -1

No files matched your search

@@ -102,6 +102,7 @@
.switchOption {
display: flex;
cursor: pointer;
height: 4.5rem;
align-items: center;
padding: 0.625rem 0.75rem;
@@ -570,7 +570,17 @@ export const WidgetEditModal = createModal<WidgetEditModalProps<WidgetKind>>(({
}
return (
<Box key={key} className={classes.switchOption} data-option-type={value.type}>
<Box
key={key}
className={classes.switchOption}
data-option-type={value.type}
onClick={(event) => {
const target = event.target;
if (target instanceof Element && target.closest("label, input")) return;
const input = event.currentTarget.querySelector<HTMLInputElement>("input[type=checkbox]");
if (!input?.disabled) input?.click();
}}
>
<Input
kind={innerProps.kind}
property={key}