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
35 lines
771 B
Vue
35 lines
771 B
Vue
<script setup lang="ts">
|
|
import { isDark, toggleDark } from '../../composables/dark'
|
|
import { useNavbarLocale } from '../../composables/navbar-locale'
|
|
import CommonThemeToggler from '../common/vp-theme-toggler.vue'
|
|
|
|
const locale = useNavbarLocale()
|
|
</script>
|
|
|
|
<template>
|
|
<div class="theme-toggler-content">
|
|
<CommonThemeToggler
|
|
:aria-label="locale['theme-toggler']"
|
|
:aria-checked="isDark"
|
|
@click="() => toggleDark()"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped lang="scss">
|
|
@use '../../styles/mixins' as *;
|
|
.theme-toggler-content {
|
|
@include with-bg;
|
|
background-color: transparent;
|
|
display: none;
|
|
border-radius: 50%;
|
|
height: 24px;
|
|
padding: 0 12px;
|
|
|
|
@include respond-to('md') {
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
}
|
|
</style>
|