From ed84e6336787263fdc68358ce08ff3e34093843e Mon Sep 17 00:00:00 2001 From: Arlo Date: Mon, 8 Jan 2024 12:50:51 +0800 Subject: [PATCH] fix(ui): destructure slot data binding for `DarkToggle` component (#160) --- packages/client/src/components/common/DockingPanel.vue | 2 +- packages/ui/src/components/DarkToggle.vue | 7 +------ packages/ui/storybook/DarkToggle.story.vue | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/client/src/components/common/DockingPanel.vue b/packages/client/src/components/common/DockingPanel.vue index 3f30857c..35101c88 100644 --- a/packages/client/src/components/common/DockingPanel.vue +++ b/packages/client/src/components/common/DockingPanel.vue @@ -52,7 +52,7 @@ watch(activeAppRecordId, (id) => { diff --git a/packages/ui/src/components/DarkToggle.vue b/packages/ui/src/components/DarkToggle.vue index b50c09f2..725b9c0b 100644 --- a/packages/ui/src/components/DarkToggle.vue +++ b/packages/ui/src/components/DarkToggle.vue @@ -70,15 +70,10 @@ function toggle(event?: MouseEvent) { ) }) } -const context = { - mode, - isDark, - toggle, -} diff --git a/packages/ui/storybook/DarkToggle.story.vue b/packages/ui/storybook/DarkToggle.story.vue index 2049e2f5..1cec4b60 100644 --- a/packages/ui/storybook/DarkToggle.story.vue +++ b/packages/ui/storybook/DarkToggle.story.vue @@ -24,7 +24,7 @@ const dark = computed({ toggle(e) }" > - + @@ -37,7 +37,7 @@ const dark = computed({ toggle(e) }" > - +