feat: button group

This commit is contained in:
Alexandr
2022-07-01 17:17:48 +03:00
parent f0cd1a8444
commit 9e76cdf938
6 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<template>
<div class="btn-group inline-flex rounded-md shadow-sm" role="group">
<slot />
</div>
</template>
<!-- TODO: maybe use provide/inject to control styles -->
<style>
@tailwind components;
@layer components {
.btn-group > button {
@apply rounded-none
}
.btn-group > button:first-child {
@apply rounded-l-lg
}
.btn-group > button:last-child {
@apply rounded-r-lg
}
}
</style>

View File

@@ -1,2 +1,3 @@
export { default as Button } from './components/Button/Button.vue'
export { default as Spinner } from './components/Spinner/Spinner.vue'
export { default as ButtonGroup } from './components/ButtonGroup/ButtonGroup.vue'