Theme light/dark mode #85
Answered
by
antfu
nico-bachner
asked this question in
Q&A
-
I'm currently working on a new theme for slidev, but I'm having difficulties wrapping my head around the light/dark mode situation. I see the theme switch is on the slide, so I assume it's using a class-based toggle (or something of the likes). My question is: how do you access the state of the switch? |
Beta Was this translation helpful? Give feedback.
Answered by
antfu
May 12, 2021
Replies: 1 comment 1 reply
-
import { isDark, toggleDark } from '@slidev/client/logic/dark' |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nico-bachner
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can see https://github.com/slidevjs/slidev/blob/7af7b6864b7d999a94e5eb0e1af9011b907470f4/demo/composable-vue/components/DarkToggle.vue