Skip to content

Commit

Permalink
chore(Button): add rounded preset
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamincanac committed May 17, 2022
1 parent 4851a4b commit 3c724e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/runtime/components/elements/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)
})
Expand Down
1 change: 1 addition & 0 deletions src/runtime/presets/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 3c724e8

Please sign in to comment.