diff --git a/packages/docs/components/layout/header/ThemeSwitch.vue b/packages/docs/components/layout/header/ThemeSwitch.vue index 561e31ce0b..3e6e3cd806 100644 --- a/packages/docs/components/layout/header/ThemeSwitch.vue +++ b/packages/docs/components/layout/header/ThemeSwitch.vue @@ -25,13 +25,11 @@ import { computed } from 'vue' import { useColors } from 'vuestic-ui' -const { currentPresetName } = useColors() - -const { setTheme } = useTheme() +const { currentPresetName, applyPreset } = useColors() const isDark = computed({ get: () => currentPresetName.value === 'dark', - set: (value) => setTheme(value ? 'dark' : 'light'), + set: (value) => applyPreset(value ? 'dark' : 'light'), }) diff --git a/packages/docs/composables/useTheme.ts b/packages/docs/composables/useTheme.ts deleted file mode 100644 index 9d2737ed41..0000000000 --- a/packages/docs/composables/useTheme.ts +++ /dev/null @@ -1,12 +0,0 @@ -export const useTheme = () => { - const { applyPreset } = useColors() - - const setTheme = (theme?: string) => { - if (theme === undefined) { return } - applyPreset(theme) - } - - return { - setTheme - } -}