2023-09-09 22:18:16 +00:00
|
|
|
<template>
|
|
|
|
<div class="panel">
|
|
|
|
<p class="panel-heading is-unselectable" @click="is_open = !is_open">
|
|
|
|
<span class="icon-text">
|
2023-09-09 23:19:46 +00:00
|
|
|
<span class="icon">
|
2023-09-09 22:18:16 +00:00
|
|
|
<font-awesome-icon
|
2023-09-09 23:19:46 +00:00
|
|
|
:icon="'fa-solid fa-angle-' + (is_open ? 'down' : 'right')"
|
2023-09-09 22:18:16 +00:00
|
|
|
/>
|
|
|
|
</span>
|
2023-09-10 00:54:29 +00:00
|
|
|
<span v-if="header !== ''">{{ header }}</span>
|
2023-09-09 22:18:16 +00:00
|
|
|
</span>
|
|
|
|
</p>
|
|
|
|
<slot v-if="is_open" name="default" />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2023-09-10 00:54:29 +00:00
|
|
|
import { Options, Vue } from "vue-class-component";
|
2023-09-09 22:18:16 +00:00
|
|
|
|
2023-09-10 00:54:29 +00:00
|
|
|
@Options({
|
|
|
|
props: {
|
|
|
|
header: {
|
|
|
|
type: String,
|
|
|
|
required: false,
|
|
|
|
default: "",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
2023-09-09 22:18:16 +00:00
|
|
|
export default class extends Vue {
|
|
|
|
public is_open = false;
|
2023-09-10 00:54:29 +00:00
|
|
|
public header!: string;
|
2023-09-09 22:18:16 +00:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
div.panel > .panel-heading {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
</style>
|