diff --git a/packages/core/src/components/switch/switch.tsx b/packages/core/src/components/switch/switch.tsx index 9b50aa8..946a7d3 100644 --- a/packages/core/src/components/switch/switch.tsx +++ b/packages/core/src/components/switch/switch.tsx @@ -37,7 +37,7 @@ export function Switch(props: SwitchProps): JSX.Element { const [isChecked, setChecked] = createControllableSignal({ value: () => local.checked, defaultValue: () => local.defaultChecked ?? false, - onChange: local.onCheckedChange ?? (() => {}), + onChange: local.onCheckedChange, }); return ( diff --git a/packages/core/src/components/toggle/toggle.tsx b/packages/core/src/components/toggle/toggle.tsx index da674af..5cfb901 100644 --- a/packages/core/src/components/toggle/toggle.tsx +++ b/packages/core/src/components/toggle/toggle.tsx @@ -29,7 +29,7 @@ export function Toggle(props: ToggleProps): JSX.Element { const [isPressed, setPressed] = createControllableSignal({ value: () => local.pressed, defaultValue: () => local.defaultPressed ?? false, - onChange: local.onPressedChange ?? (() => {}), + onChange: local.onPressedChange, }); return (