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

16 lines
290 B
Vue
Raw Normal View History

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