Skip to content

Commit 08326e6

Browse files
committed
refactor(CWidgetStatsC): update colors
1 parent a34aff5 commit 08326e6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/coreui-react/src/components/widgets/CWidgetStatsC.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { CProgress, CProgressProps } from '../progress/CProgress'
66

77
import { colorPropType } from '../../props'
88
import type { Colors } from '../../types'
9+
import classNames from 'classnames'
910

1011
export interface CWidgetStatsCProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
1112
/**
@@ -53,7 +54,16 @@ export const CWidgetStatsC = forwardRef<HTMLDivElement, CWidgetStatsCProps>(
5354
ref={ref}
5455
>
5556
<CCardBody>
56-
{icon && <div className="text-end mb-4">{icon}</div>}
57+
{icon && (
58+
<div
59+
className={classNames(
60+
'text-end mb-4',
61+
inverse ? 'text-white text-opacity-75' : 'text-body-secondary',
62+
)}
63+
>
64+
{icon}
65+
</div>
66+
)}
5767
{value && <div className="fs-4 fw-semibold">{value}</div>}
5868
{title && (
5969
<div className={inverse ? 'text-white text-opacity-75' : 'text-body-secondary'}>

0 commit comments

Comments
 (0)