mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
26 lines
580 B
Vue
26 lines
580 B
Vue
<script lang="ts">
|
|
import { tv } from 'tailwind-variants'
|
|
import appConfig from '#build/app.config'
|
|
import theme from '#build/ui/container'
|
|
|
|
const container = tv({ extend: tv(theme), ...(appConfig.ui?.container || {}) })
|
|
|
|
export interface ContainerProps {
|
|
as?: string
|
|
class?: any
|
|
}
|
|
</script>
|
|
|
|
<script setup lang="ts">
|
|
defineOptions({ inheritAttrs: false })
|
|
|
|
const props = withDefaults(defineProps<ContainerProps>(), {
|
|
as: 'div'
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<component :is="as" :class="container({ class: props.class })" v-bind="$attrs">
|
|
<slot />
|
|
</component>
|
|
</template> |