chore(Button): add rounded preset

This commit is contained in:
Benjamin Canac
2022-05-17 17:15:24 +02:00
parent 4851a4b905
commit 3c724e89d4
2 changed files with 6 additions and 1 deletions

View File

@@ -86,6 +86,10 @@ const props = defineProps({
type: Boolean,
default: false
},
roundedClass: {
type: String,
default: () => $ui.button.rounded
},
baseClass: {
type: String,
default: () => $ui.button.base
@@ -145,7 +149,7 @@ const buttonClass = computed(() => {
$ui.button[isSquare.value ? 'square' : 'spacing'][props.size],
$ui.button.variant[props.variant],
props.block ? 'w-full flex justify-center items-center' : 'inline-flex items-center',
props.rounded ? 'rounded-full' : 'rounded-md',
props.rounded ? 'rounded-full' : props.roundedClass,
props.customClass
)
})

View File

@@ -2,6 +2,7 @@ import { safeColors } from '../utils/colors'
const button = {
base: 'font-medium focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 focus:ring-offset-white dark:focus:ring-offset-black',
rounded: 'rounded-md',
size: {
xxs: 'text-xs',
xs: 'text-xs',