FMHYedit/.vitepress/theme/components/ToggleStarred.vue

17 lines
290 B
Vue
Raw Permalink Normal View History

2023-11-12 16:42:57 +00:00
<script setup lang="ts">
2024-01-25 16:32:45 +00:00
import Switch from './Switch.vue'
2023-11-12 16:42:57 +00:00
2024-01-25 16:32:45 +00:00
const toggleStarred = () =>
document.documentElement.classList.toggle('starred-only')
2023-11-12 16:42:57 +00:00
</script>
<template>
<Switch @click="toggleStarred()" />
</template>
<style>
.starred-only li:not(.starred) {
display: none;
}
</style>