From d30ee275b33ce266a10f26ac52319f45b62ed826 Mon Sep 17 00:00:00 2001 From: Jerry_wu <409187100@qq.com> Date: Thu, 31 Oct 2024 20:11:25 +0800 Subject: [PATCH] fix conflict --- .../docs/headless/switch/examples/hero.tsx | 12 ++++-- .../src/components/switch/switch-input.tsx | 5 ++- .../src/components/switch/switch-lable.tsx | 2 +- .../src/components/switch/switch-root.tsx | 1 + .../src/components/switch/switch.driver.ts | 37 +++++++++++++++++ .../src/components/switch/switch.test.ts | 41 +++++++++++++++++++ 6 files changed, 92 insertions(+), 6 deletions(-) create mode 100644 packages/kit-headless/src/components/switch/switch.driver.ts 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 ( -