/* eslint-disable react/require-default-props */ /* eslint-disable @typescript-eslint/no-explicit-any */ import classNames from 'classnames'; import PropTypes from 'prop-types'; import React from 'react'; import CProgress from '../progress/CProgress'; // component - CoreUI / CWidgetProgress const CWidgetProgress = (props: any) => { const { children, className, // header, text, footer, color, value, inverse, ...attributes } = props; const classes = classNames( 'card', inverse ? [color && `bg-${color}`, 'text-white'] : '', className ); return ( <>
{header &&
{header}
} {text &&
{text}
} {children || ( )} {footer && {footer}}
); }; CWidgetProgress.propTypes = { children: PropTypes.node, className: PropTypes.oneOfType([ PropTypes.string, PropTypes.array, PropTypes.object, ]), // innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), header: PropTypes.string, text: PropTypes.string, footer: PropTypes.string, color: PropTypes.string, value: PropTypes.number, inverse: PropTypes.bool, variant: PropTypes.string, }; CWidgetProgress.defaultProps = { value: 25, }; export default CWidgetProgress;