default is start, added center option
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div :class="['sm-container', { full: full }]">
|
||||
<div :class="['sm-container', { full: full, 'my-auto': center }]">
|
||||
<slot v-if="slots.default"></slot>
|
||||
<div v-if="slots.inner" class="sm-container-inner">
|
||||
<slot name="inner"></slot>
|
||||
@@ -16,6 +16,11 @@ const props = defineProps({
|
||||
default: false,
|
||||
required: false,
|
||||
},
|
||||
center: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
required: false,
|
||||
},
|
||||
});
|
||||
|
||||
const slots = useSlots();
|
||||
@@ -27,7 +32,6 @@ const slots = useSlots();
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
padding: 0 16px 0 16px;
|
||||
margin: auto;
|
||||
max-width: 1200px;
|
||||
|
||||
&.full {
|
||||
|
||||
Reference in New Issue
Block a user