mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 23:40:39 +01:00
chore(Container): update
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user