@@ -9,6 +9,7 @@ import { CCardBody } from '../card/CCardBody'
99
1010export interface CWidgetDropdownProps extends HTMLAttributes < HTMLDivElement > {
1111 action ?: string | ReactNode
12+ change ?: string | ReactNode
1213 chart ?: string | ReactNode
1314 /**
1415 * A string of all className you want applied to the base component. [docs]
@@ -25,7 +26,7 @@ export interface CWidgetDropdownProps extends HTMLAttributes<HTMLDivElement> {
2526}
2627
2728export const CWidgetDropdown = forwardRef < HTMLDivElement , CWidgetDropdownProps > (
28- ( { action, chart, className, color, title, value, ...rest } , ref ) => {
29+ ( { action, change , chart, className, color, title, value, ...rest } , ref ) => {
2930 const _className = classNames (
3031 { [ `bg-${ color } ` ] : color , 'text-high-emphasis-inverse' : color } ,
3132 className ,
@@ -35,7 +36,11 @@ export const CWidgetDropdown = forwardRef<HTMLDivElement, CWidgetDropdownProps>(
3536 < CCard className = { _className } { ...rest } ref = { ref } >
3637 < CCardBody className = "pb-0 d-flex justify-content-between align-items-start" >
3738 < div >
38- { value && < div className = "fs-4 fw-semibold" > { value } </ div > }
39+ { value && (
40+ < div className = "fs-4 fw-semibold" >
41+ { value } { change && < span className = "fs-6 fw-normal" > { change } </ span > }
42+ </ div >
43+ ) }
3944 { title && < div > { title } </ div > }
4045 </ div >
4146 { action }
@@ -48,6 +53,7 @@ export const CWidgetDropdown = forwardRef<HTMLDivElement, CWidgetDropdownProps>(
4853
4954CWidgetDropdown . propTypes = {
5055 action : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
56+ change : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
5157 chart : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
5258 className : PropTypes . string ,
5359 color : colorPropType ,
0 commit comments