element-plus/docs/.vitepress/vitepress/components/navbar/vp-theme-toggler.vue
云游君 8583c70fdc
feat(theme-chalk): use @use instead of @import & remove /**/ comment (#3696)
* feat(theme-chalk): use @use instead of @import & remove /**/ comment

* refactor(theme-chalk): refactor scss with @use module

* fix(docs): scss in docs toggle to '@use'

* docs: add custom theme on demand

* docs: add unplugin-element-plus
2021-09-28 20:42:12 +08:00

28 lines
536 B
Vue

<script setup lang="ts">
import { useTheme } from '../../composables/theme'
import CommonThemeToggler from '../common/vp-theme-toggler.vue'
const toggle = useTheme()
</script>
<template>
<div class="theme-toggler-content">
<CommonThemeToggler @click="toggle" />
</div>
</template>
<style scoped lang="scss">
@use '../../styles/mixins' as *;
.theme-toggler-content {
@include with-bg;
display: none;
border-radius: 50%;
height: 20px;
padding: 0 8px;
@include respond-to('md') {
display: block;
}
}
</style>