chore(Container): update

This commit is contained in:
Benjamin Canac
2024-03-07 12:55:55 +01:00
parent c90cea55a7
commit 05e93387b9

View File

@@ -3,7 +3,7 @@ import { tv } from 'tailwind-variants'
// import appConfig from '#build/app.config'
import theme from '#ui/theme/container'
const appContainer = tv(theme)
const container = tv(theme)
// const appContainer = tv({ extend: container, ...(appConfig.ui?.container || {}) })
export interface ContainerProps {
@@ -13,22 +13,16 @@ export interface ContainerProps {
</script>
<script setup lang="ts">
import { computed } from 'vue'
defineOptions({ inheritAttrs: false })
const props = withDefaults(defineProps<ContainerProps>(), {
as: 'div',
class: undefined
})
// Computed
const base = computed(() => appContainer({ class: props.class }))
</script>
<template>
<component :is="as" :class="base" v-bind="$attrs">
<component :is="as" :class="container({ class: props.class })" v-bind="$attrs">
<slot />
</component>
</template>