Skip to content

Commit 51cf9a9

Browse files
committed
refactor(CButton): improve colors and variants handling
1 parent 5f76520 commit 51cf9a9

File tree

1 file changed

+2
-1
lines changed
  • packages/coreui-vue/src/components/button

1 file changed

+2
-1
lines changed

packages/coreui-vue/src/components/button/CButton.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,9 @@ export const CButton = defineComponent({
9393
{
9494
class: [
9595
'btn',
96-
props.variant ? `btn-${props.variant}-${props.color}` : `btn-${props.color}`,
9796
{
97+
[`btn-${props.color}`]: props.color && !props.variant,
98+
[`btn-${props.variant}-${props.color}`]: props.color && props.variant,
9899
[`btn-${props.size}`]: props.size,
99100
active: props.active,
100101
disabled: props.disabled,

0 commit comments

Comments
 (0)