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 8ab945e

Browse filesBrowse files
committed
refactor(CButton): improve colors and variants handling
1 parent df09e84 commit 8ab945e
Copy full SHA for 8ab945e

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎packages/coreui-react/src/components/button/CButton.tsx

Copy file name to clipboardExpand all lines: packages/coreui-react/src/components/button/CButton.tsx
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,11 @@ export const CButton: PolymorphicRefForwardingComponent<'button', CButtonProps>
7474
{...(!rest.href && { type: type })}
7575
className={classNames(
7676
'btn',
77-
variant ? `btn-${variant}-${color}` : `btn-${color}`,
78-
{ [`btn-${size}`]: size },
77+
{
78+
[`btn-${color}`]: color && !variant,
79+
[`btn-${variant}-${color}`]: color && variant,
80+
[`btn-${size}`]: size,
81+
},
7982
shape,
8083
className,
8184
)}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.