opnform-host-nginx/client/components/open/editors/EditorOptionsPanel.vue

56 lines
1.0 KiB
Vue
Raw Normal View History

2023-12-09 15:47:03 +01:00
<template>
<collapse
v-model="show"
class="p-4 w-full border-b"
>
2023-12-09 15:47:03 +01:00
<template #title>
<div class="flex items-center pr-8">
<div
class="mr-3"
:class="{ 'text-blue-600': show, 'text-gray-500': !show }"
>
2023-12-09 15:47:03 +01:00
<slot name="icon" />
</div>
<h3
id="v-step-2"
class="font-semibold flex-grow"
>
2023-12-09 15:47:03 +01:00
{{ name }}
</h3>
<pro-tag v-if="hasProTag" />
</div>
</template>
<slot />
</collapse>
</template>
<script>
import Collapse from "~/components/global/Collapse.vue"
import ProTag from "~/components/global/ProTag.vue"
2023-12-09 15:47:03 +01:00
export default {
name: "EditorOptionsPanel",
2023-12-09 15:47:03 +01:00
components: { Collapse, ProTag },
props: {
name: {
type: String,
required: true,
2023-12-09 15:47:03 +01:00
},
hasProTag: {
type: Boolean,
default: false,
2023-12-09 15:47:03 +01:00
},
alreadyOpened: {
type: Boolean,
default: false,
},
2023-12-09 15:47:03 +01:00
},
data() {
2023-12-09 15:47:03 +01:00
return {
show: this.alreadyOpened,
2023-12-09 15:47:03 +01:00
}
},
2023-12-09 15:47:03 +01:00
}
</script>