element-plus/docs/.vitepress/vitepress/components/full-screen/vp-theme-toggler.vue
qiang a4063fd8d2
docs: accessibility improvement (#11825)
* docs: accessibility improvement for navbar

* docs: accessibility improvement for demo

* refactor: replace ElPopover with ElDropdown

* docs: accessibility improvement for nav-full

* docs: accessibility improvement for back-to-top

* feat: add skip link that jump to the content
2023-03-10 14:43:22 +08:00

32 lines
756 B
Vue

<script setup lang="ts">
import CommonThemeToggler from '../common/vp-theme-toggler.vue'
import { isDark, toggleDark } from '../../composables/dark'
import { useNavbarLocale } from '../../composables/navbar-locale'
const locale = useNavbarLocale()
</script>
<template>
<div class="full-screen-theme-toggler">
<span>Theme</span>
<CommonThemeToggler
:aria-label="locale['theme-toggler']"
:aria-checked="isDark"
@click="toggleDark()"
/>
</div>
</template>
<style lang="scss" scoped>
.full-screen-theme-toggler {
display: flex;
padding: 12px 14px;
align-items: center;
justify-content: space-between;
margin-top: 16px;
font-size: 13px;
background-color: var(--bg-color-soft);
border-radius: 8px;
}
</style>