fix: include media within content warning
This commit is contained in:
parent
a5b9f25777
commit
019a36c9bb
4 changed files with 36 additions and 20 deletions
16
components/status/StatusSpoiler.vue
Normal file
16
components/status/StatusSpoiler.vue
Normal file
|
@ -0,0 +1,16 @@
|
|||
<script setup lang="ts">
|
||||
const props = defineProps<{ enabled: boolean }>()
|
||||
defineSlots<'spoiler'>()
|
||||
|
||||
const [showContent, toggleContent] = $(useToggle(!props.enabled))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="enabled" flex flex-col items-start gap-2>
|
||||
<slot name="spoiler" />
|
||||
<button btn-outline px-2 py-1 text-3 @click="toggleContent()">
|
||||
{{ showContent ? 'Show less' : 'Show more' }}
|
||||
</button>
|
||||
</div>
|
||||
<slot v-if="showContent" />
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue