66 lines
770 B
Plaintext
66 lines
770 B
Plaintext
<template>
|
|
<div class="container"><slot /></div>
|
|
</template>
|
|
|
|
<script>
|
|
export default class Space {
|
|
props = {
|
|
gap: 'l'
|
|
}
|
|
|
|
state = {
|
|
content: ''
|
|
}
|
|
|
|
__init__() {
|
|
/* render */
|
|
}
|
|
|
|
mounted() {}
|
|
|
|
unmounted() {}
|
|
|
|
watch() {}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
:host {
|
|
display: block;
|
|
}
|
|
.container {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
width: 100%;
|
|
gap: 12px;
|
|
}
|
|
:host([vertical]) {
|
|
.container {
|
|
flex-direction: column;
|
|
}
|
|
}
|
|
:host([justify]) {
|
|
.container {
|
|
justify-content: space-between;
|
|
}
|
|
}
|
|
|
|
$gaps: (
|
|
's': 4px,
|
|
'm': 8px,
|
|
'l': 12px,
|
|
'xl': 16px,
|
|
'xxl': 20px,
|
|
'xxxl': 24px,
|
|
'xxxxl': 28px
|
|
);
|
|
@each $k, $v in $gaps {
|
|
:host([gap='#{$k}']) {
|
|
.container {
|
|
gap: $v;
|
|
}
|
|
}
|
|
}
|
|
</style>
|
JavaScript
95.2%
CSS
4.8%