mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-29 19:30:37 +01:00
chore(Container): add as prop
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :class="[ui.base, ui.padding, ui.constrained]">
|
<component :is="as" :class="[ui.base, ui.padding, ui.constrained]">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
@@ -17,6 +17,10 @@ import appConfig from '#build/app.config'
|
|||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
props: {
|
props: {
|
||||||
|
as: {
|
||||||
|
type: String,
|
||||||
|
default: 'div'
|
||||||
|
},
|
||||||
ui: {
|
ui: {
|
||||||
type: Object as PropType<Partial<typeof appConfig.ui.container>>,
|
type: Object as PropType<Partial<typeof appConfig.ui.container>>,
|
||||||
default: () => appConfig.ui.container
|
default: () => appConfig.ui.container
|
||||||
|
|||||||
Reference in New Issue
Block a user