# Pull Request Template ## Description This PR updates settings page UI ## Type of change - [x] New feature (non-breaking change which adds functionality) ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
32 lines
623 B
Vue
32 lines
623 B
Vue
<script setup>
|
|
import { useToggle } from '@vueuse/core';
|
|
|
|
const props = defineProps({
|
|
title: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
defaultOpen: {
|
|
type: Boolean,
|
|
default: true,
|
|
},
|
|
});
|
|
|
|
const [isOpen, toggle] = useToggle(props.defaultOpen);
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
v-bind="$attrs"
|
|
class="flex items-center justify-between w-full cursor-pointer pb-2 pt-4 border-t border-n-weak"
|
|
@click="toggle()"
|
|
>
|
|
<span class="text-heading-2 text-n-slate-12 w-full">
|
|
{{ title }}
|
|
</span>
|
|
</div>
|
|
<div v-if="isOpen" class="w-full space-y-4 pt-4 mb-4">
|
|
<slot />
|
|
</div>
|
|
</template>
|