Add size to box

This commit is contained in:
philipp lang 2024-06-14 00:58:56 +02:00
parent 5a7a301490
commit 20fa2cc2b8
1 changed files with 15 additions and 1 deletions

View File

@ -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,