2021-01-14 19:17:12 +01:00
|
|
|
<template>
|
2022-04-06 18:02:11 +02:00
|
|
|
<div
|
2022-08-12 16:46:44 +02:00
|
|
|
class="flex flex-col items-center"
|
|
|
|
:class="{ 'mt-20 mb-10': inline, 'mt-80': !inline, 'text-center': center }"
|
2022-04-06 18:02:11 +02:00
|
|
|
role="note"
|
|
|
|
>
|
2022-07-12 10:55:28 +02:00
|
|
|
<o-icon :icon="icon" customSize="48" />
|
|
|
|
<h2 class="mb-3">
|
2021-01-14 19:17:12 +01:00
|
|
|
<!-- @slot Mandatory title -->
|
|
|
|
<slot />
|
|
|
|
</h2>
|
2022-07-12 10:55:28 +02:00
|
|
|
<p v-show="slots.desc" :class="descriptionClasses">
|
2021-01-14 19:17:12 +01:00
|
|
|
<!-- @slot Optional description -->
|
|
|
|
<slot name="desc" />
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</template>
|
2022-07-12 10:55:28 +02:00
|
|
|
<script lang="ts" setup>
|
|
|
|
import { useSlots } from "vue";
|
2021-01-14 19:17:12 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
withDefaults(
|
|
|
|
defineProps<{
|
|
|
|
icon: string;
|
|
|
|
descriptionClasses?: string;
|
|
|
|
inline?: boolean;
|
|
|
|
center?: boolean;
|
|
|
|
}>(),
|
|
|
|
{ descriptionClasses: "", inline: false, center: false }
|
|
|
|
);
|
2021-01-14 19:17:12 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
const slots = useSlots();
|
|
|
|
</script>
|