Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 51cf9a9

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

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Copy file name to clipboardExpand all lines: packages/coreui-vue/src/components/button/CButton.ts
+2-1Lines 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 ? `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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.