Files
ui/docs/components/content/ComponentExample.vue
Benjamin Canac 6da0db0113 feat: rewrite to use app config and rework docs (#143)
Co-authored-by: Daniel Roe <daniel@roe.dev>
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
2023-05-04 14:49:19 +02:00

23 lines
609 B
Vue

<template>
<div class="[&>div>pre]:!rounded-t-none">
<div class="flex border border-gray-200 dark:border-gray-700 relative not-prose rounded-t-md" :class="[{ 'p-4': padding, 'rounded-b-md': !$slots.code, 'border-b-0': !!$slots.code }, backgroundClass]">
<ContentSlot v-if="$slots.default" :use="$slots.default" />
</div>
<ContentSlot v-if="$slots.code" :use="$slots.code" />
</div>
</template>
<script setup lang="ts">
defineProps({
padding: {
type: Boolean,
default: true
},
backgroundClass: {
type: String,
default: 'bg-white dark:bg-gray-900'
}
})
</script>