Skip to content

Commit d53b6fe

Browse files
authored
Merge pull request #304 from jrd-lewis/feature/cbutton-variant-fix
Fix: CButton variant styling when undefined
2 parents c54eae4 + 0f0e550 commit d53b6fe

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

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

0 commit comments

Comments
 (0)