/* 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'; // component - CoreUI / CWidgetIcon const CWidgetIcon = (props: any) => { const { className, children, // header, text, iconPadding, color, footerSlot, ...attributes } = props; const classes = classNames('card', color, className); return ( <>
{children}
{header && (
{header}
)} {text && (
{text}
)}
{footerSlot}
); }; CWidgetIcon.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, iconPadding: PropTypes.bool, color: PropTypes.string, footerSlot: PropTypes.node, }; CWidgetIcon.defaultProps = { iconPadding: true, }; export default CWidgetIcon;