docs/.vitepress/theme/components/Collapsible.vue

3461046dea91751bd041a3a61d16ea229e1c60c5
wotaku/docs/.vitepress/theme/components/Collapsible.vue

16 lines · 362 bytes

 1<script setup lang="ts">
 2import { ref } from 'vue'
 3
 4const props = defineProps<{
 5  title?: string
 6}>()
 7
 8const open = ref(false)
 9</script>
10
11<template>
12  <details class="details custom-block" :open="open || undefined" @toggle="open = ($event.target as HTMLDetailsElement).open">
13    <summary>{{ title || 'Details' }}</summary>
14    <slot />
15  </details>
16</template>
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form