blog-vue/src/components/TheBox.vue

26 lines
357 B
Vue

<script setup lang="ts">
export interface Props {
rows?: number
}
const props = withDefaults(defineProps<Props>(), {
rows: 1
})
</script>
<template>
<div class="box">
<slot></slot>
</div>
</template>
<style scoped>
.box {
border-radius: 5px;
background-color: #e5d9c7;
padding: 1em;
grid-row-end: span v-bind(props.rows);
}
</style>