1- import React , { ElementType , forwardRef , HTMLAttributes , useMemo } from 'react'
1+ import React , { forwardRef , HTMLAttributes , ReactNode , useMemo } from 'react'
22import PropTypes from 'prop-types'
33import classNames from 'classnames'
44
@@ -20,7 +20,7 @@ export interface CWidgetBrandProps extends HTMLAttributes<HTMLDivElement> {
2020 * @type 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | string
2121 */
2222 color ?: Colors
23- headerChildren ?: string | ElementType
23+ headerChildren ?: string | ReactNode
2424 values ?: Array < string | number > | Array < Array < string | number > >
2525}
2626
@@ -37,15 +37,15 @@ export const CWidgetBrand = forwardRef<HTMLDivElement, CWidgetBrandProps>(
3737 const generatedItems = useMemo ( ( ) => {
3838 return (
3939 values &&
40- values . map ( ( value : any , index : any ) => {
40+ values . map ( ( value : any , index : number ) => {
4141 return (
42- < >
42+ < React . Fragment key = { index } >
4343 { index % 2 !== 0 && < div className = "vr" > </ div > }
44- < CCol key = { index } >
44+ < CCol >
4545 < div className = "fs-5 fw-semibold" > { value [ 0 ] } </ div >
4646 < div className = "text-uppercase text-medium-emphasis small" > { value [ 1 ] } </ div >
4747 </ CCol >
48- </ >
48+ </ React . Fragment >
4949 )
5050 } )
5151 )
@@ -63,7 +63,7 @@ export const CWidgetBrand = forwardRef<HTMLDivElement, CWidgetBrandProps>(
6363CWidgetBrand . propTypes = {
6464 className : PropTypes . string ,
6565 color : colorPropType ,
66- headerChildren : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . elementType ] ) ,
66+ headerChildren : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . node ] ) ,
6767 values : PropTypes . arrayOf ( PropTypes . any ) ,
6868}
6969
0 commit comments