Skip to content

Commit

Permalink
chore(Container): add as prop
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed May 16, 2023
1 parent 4d8dbfb commit cba95de
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/runtime/components/layout/Container.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div :class="[ui.base, ui.padding, ui.constrained]">
<component :is="as" :class="[ui.base, ui.padding, ui.constrained]">
<slot />
</div>
</component>
</template>

<script lang="ts">
Expand All @@ -17,6 +17,10 @@ import appConfig from '#build/app.config'
export default defineComponent({
props: {
as: {
type: String,
default: 'div'
},
ui: {
type: Object as PropType<Partial<typeof appConfig.ui.container>>,
default: () => appConfig.ui.container
Expand Down

0 comments on commit cba95de

Please sign in to comment.