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

16 lines
290 B
Vue
Raw Normal View History

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