mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 02:10:40 +01:00
chore(Button): add rounded preset
This commit is contained in:
@@ -86,6 +86,10 @@ const props = defineProps({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
|
roundedClass: {
|
||||||
|
type: String,
|
||||||
|
default: () => $ui.button.rounded
|
||||||
|
},
|
||||||
baseClass: {
|
baseClass: {
|
||||||
type: String,
|
type: String,
|
||||||
default: () => $ui.button.base
|
default: () => $ui.button.base
|
||||||
@@ -145,7 +149,7 @@ const buttonClass = computed(() => {
|
|||||||
$ui.button[isSquare.value ? 'square' : 'spacing'][props.size],
|
$ui.button[isSquare.value ? 'square' : 'spacing'][props.size],
|
||||||
$ui.button.variant[props.variant],
|
$ui.button.variant[props.variant],
|
||||||
props.block ? 'w-full flex justify-center items-center' : 'inline-flex items-center',
|
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
|
props.customClass
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { safeColors } from '../utils/colors'
|
|||||||
|
|
||||||
const button = {
|
const button = {
|
||||||
base: 'font-medium focus:outline-none disabled:cursor-not-allowed disabled:opacity-75 focus:ring-offset-white dark:focus:ring-offset-black',
|
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: {
|
size: {
|
||||||
xxs: 'text-xs',
|
xxs: 'text-xs',
|
||||||
xs: 'text-xs',
|
xs: 'text-xs',
|
||||||
|
|||||||
Reference in New Issue
Block a user