Reviewed-on: #268 Reviewed-by: Mikolaj Widla <widlam@noreply.example.com> Co-authored-by: Adam Bem <adam.bem@zoho.eu> Co-committed-by: Adam Bem <adam.bem@zoho.eu>
22 lines
792 B
Vue
22 lines
792 B
Vue
<script setup lang="ts">
|
|
import { ref } from 'vue';
|
|
const isCategoryHidden = ref(true)
|
|
|
|
const props = defineProps({
|
|
name: {type: String, required: true}
|
|
})
|
|
|
|
function toggleTooltips() {
|
|
isCategoryHidden.value = !isCategoryHidden.value;
|
|
}
|
|
|
|
</script>
|
|
|
|
<template>
|
|
<div class="flex p-2 flex-col rounded-xl shadow-lg bg-gradient-to-r from-gray-300 to-slate-300 dark:from-slate-600 dark:to-slate-700">
|
|
<button :class="{ 'mb-2' : !isCategoryHidden }" class="dark:text-slate-100 hover:font-bold" @click="toggleTooltips()">{{ props.name }}</button>
|
|
<div id="content" :class="{'hidden' : isCategoryHidden}" class="flex flex-col gap-4 w-full h-fit p-2 rounded-xl dark:text-white bg-indigo-50 dark:bg-slate-800" >
|
|
<slot></slot>
|
|
</div>
|
|
</div>
|
|
</template> |