Add size to box
This commit is contained in:
parent
5a7a301490
commit
20fa2cc2b8
|
@ -6,7 +6,7 @@
|
||||||
v-text="step"
|
v-text="step"
|
||||||
v-if="step"
|
v-if="step"
|
||||||
></div>
|
></div>
|
||||||
<div class="flex flex-row items-center p-4 border-2 rounded form-group shadow-sm group" :class="[colors[type].container, type]">
|
<div class="flex flex-row items-center border-2 rounded form-group shadow-sm group" :class="[colors[type].container, type, sizes[size].container]">
|
||||||
<div class="flex-grow text-sm" :class="colors[type].text">
|
<div class="flex-grow text-sm" :class="colors[type].text">
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</div>
|
||||||
|
@ -35,11 +35,25 @@ const colors = ref({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const sizes = ref({
|
||||||
|
default: {
|
||||||
|
container: 'p-4',
|
||||||
|
},
|
||||||
|
sm: {
|
||||||
|
container: 'p-2',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
required: true,
|
required: true,
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
|
size: {
|
||||||
|
required: false,
|
||||||
|
type: String,
|
||||||
|
default: () => 'default',
|
||||||
|
},
|
||||||
step: {
|
step: {
|
||||||
required: false,
|
required: false,
|
||||||
type: Number,
|
type: Number,
|
||||||
|
|
Loading…
Reference in New Issue