mirror of https://github.com/nkoehring/starsy.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
539 B
Vue
31 lines
539 B
Vue
<template>
|
|
<ul class="info">
|
|
<header>
|
|
Tips:
|
|
<button @click="tipsShown = !tipsShown" v-if="collapsible">
|
|
{{ tipsShown ? 'collapse' : 'expand' }}
|
|
</button>
|
|
</header>
|
|
<template v-if="tipsShown">
|
|
<slot />
|
|
</template>
|
|
</ul>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { ref } from 'vue'
|
|
|
|
const props = defineProps({
|
|
collapsible: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
hiddenByDefault: {
|
|
type: Boolean,
|
|
default: false,
|
|
},
|
|
})
|
|
|
|
const tipsShown = ref(!props.hiddenByDefault)
|
|
</script>
|