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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy