diff --git a/apps/website/src/routes/docs/headless/switch/examples/hero.tsx b/apps/website/src/routes/docs/headless/switch/examples/hero.tsx index 1233e55f3..6b92a5372 100644 --- a/apps/website/src/routes/docs/headless/switch/examples/hero.tsx +++ b/apps/website/src/routes/docs/headless/switch/examples/hero.tsx @@ -3,11 +3,17 @@ import { Switch } from '@qwik-ui/headless'; export default component$(() => { - const checked = useSignal(true) + const checked = useSignal(false) + const count = useSignal(0); useStyles$(styles); + return ( - - test + count.value++} + > + test{count.value} ); diff --git a/packages/kit-headless/src/components/switch/switch-input.tsx b/packages/kit-headless/src/components/switch/switch-input.tsx index c4bff4b0a..77618300c 100644 --- a/packages/kit-headless/src/components/switch/switch-input.tsx +++ b/packages/kit-headless/src/components/switch/switch-input.tsx @@ -29,14 +29,15 @@ export const SwitchInput = component$>(() => { }); return ( >(() => { const id = useId() return ( -