adrema/resources/js/components/ui/Box.vue

33 lines
909 B
Vue
Raw Normal View History

2022-11-22 00:37:34 +01:00
<template>
2023-12-22 00:49:19 +01:00
<section class="p-3 rounded-lg flex flex-col"
:class="{ 'bg-gray-800 group-[.is-popup]:bg-zinc-700': second === false, 'bg-gray-700 group-[.is-popup]:bg-zinc-600': second === true }">
2022-11-24 00:59:40 +01:00
<div class="flex items-center">
2023-12-22 00:49:19 +01:00
<div v-if="heading" class="col-span-full font-semibold text-gray-300 group-[.is-popup]:text-zinc-300"
v-text="heading"></div>
2022-11-24 00:59:40 +01:00
<slot name="in-title"></slot>
</div>
2023-12-22 00:49:19 +01:00
<main :class="{ 'mt-2': heading, [containerClass]: true }">
2022-11-22 00:37:34 +01:00
<slot></slot>
</main>
</section>
</template>
<script>
export default {
props: {
heading: {
type: String,
},
second: {
type: Boolean,
default: false,
},
2022-11-22 00:37:34 +01:00
containerClass: {
default: function () {
return '';
},
},
},
};
</script>