mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-12-14 17:31:02 +08:00
a4063fd8d2
* 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
32 lines
756 B
Vue
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>
|