element-plus/docs/.vitepress/vitepress/composables/dark.ts
2022-05-03 15:18:29 +08:00

8 lines
168 B
TypeScript

import { useDark, useToggle } from '@vueuse/core'
export const isDark = useDark({
storageKey: 'el-theme-appearance',
})
export const toggleDark = useToggle(isDark)