feat: add column and grid styling to button group
This commit is contained in:
parent
e67a220223
commit
8e0756f166
1 changed files with 25 additions and 1 deletions
|
@ -1,5 +1,14 @@
|
||||||
|
<script setup lang="ts">
|
||||||
|
interface Props {
|
||||||
|
col?: boolean;
|
||||||
|
grid?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
defineProps<Props>();
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="btn-group">
|
<div class="btn-group" :class="{ col: col, grid: grid }">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -10,6 +19,21 @@
|
||||||
flex-flow: row wrap;
|
flex-flow: row wrap;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
|
|
||||||
|
&.col {
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 1rem;
|
||||||
|
margin: 1rem 0;
|
||||||
|
|
||||||
|
> * {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
> * {
|
> * {
|
||||||
flex: var(--button-group-flex);
|
flex: var(--button-group-flex);
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue