import React, { forwardRef, HTMLAttributes, ReactNode } from 'react' import PropTypes from 'prop-types' import classNames from 'classnames' import { CCard, CCardBody } from '../card' export interface CWidgetStatsEProps extends Omit, 'title'> { /** * A string of all className you want applied to the base component. */ className?: string /** * Chart node for your component. */ chart?: string | ReactNode /** * Title node for your component. */ title?: string | ReactNode /** * Value node for your component. */ value?: string | number | ReactNode } export const CWidgetStatsE = forwardRef( ({ chart, className, title, value, ...rest }, ref) => { return ( {title && (
{title}
)} {value &&
{value}
} {chart}
) } ) CWidgetStatsE.propTypes = { children: PropTypes.node, chart: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), className: PropTypes.string, title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), value: PropTypes.oneOfType([PropTypes.string, PropTypes.node, PropTypes.number]), } CWidgetStatsE.displayName = 'CWidgetStatsE'