From ba9fe8fa3f270184ccaaad8215c00c68b67722d0 Mon Sep 17 00:00:00 2001 From: land Date: Mon, 3 Nov 2025 14:38:38 +0530 Subject: [PATCH] Add AMOLED switch component and update usage --- .../theme/components/ColorPicker.vue | 4 +- docs/.vitepress/theme/components/Switch.vue | 4 +- .../theme/components/amoledswitch.vue | 52 +++++++++++++++++++ 3 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 docs/.vitepress/theme/components/amoledswitch.vue diff --git a/docs/.vitepress/theme/components/ColorPicker.vue b/docs/.vitepress/theme/components/ColorPicker.vue index f14dbd760..8c58d0651 100644 --- a/docs/.vitepress/theme/components/ColorPicker.vue +++ b/docs/.vitepress/theme/components/ColorPicker.vue @@ -2,7 +2,7 @@ import { colors } from '@fmhy/colors' import { useStorage, useStyleTag } from '@vueuse/core' import { watch, onMounted } from 'vue' -import Switch from './Switch.vue' +import amoledswitch from './amoledswitch.vue' const colorScales = [ '50', @@ -135,7 +135,7 @@ const normalizeColorName = (colorName: string) =>
AMOLED - +
diff --git a/docs/.vitepress/theme/components/Switch.vue b/docs/.vitepress/theme/components/Switch.vue index 6dd41c551..25956337e 100644 --- a/docs/.vitepress/theme/components/Switch.vue +++ b/docs/.vitepress/theme/components/Switch.vue @@ -2,11 +2,11 @@ import { Switch } from '@headlessui/vue' import { ref } from 'vue' -const model = defineModel() +const enabled = defineModel({ default: false }) diff --git a/docs/.vitepress/theme/components/amoledswitch.vue b/docs/.vitepress/theme/components/amoledswitch.vue new file mode 100644 index 000000000..25956337e --- /dev/null +++ b/docs/.vitepress/theme/components/amoledswitch.vue @@ -0,0 +1,52 @@ + + + + + + +