/* 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 / CWidgetDropdown const CWidgetDropdown = (props: any) => { const { children, className, // header, color, footerSlot, text, ...attributes } = props; const classes = classNames( 'card text-white', color && `bg-${color}`, className ); return ( <>
{header &&
{header}
} {text &&
{text}
}
{children}
{footerSlot}
); }; CWidgetDropdown.propTypes = { children: PropTypes.node, className: PropTypes.oneOfType([ PropTypes.string, PropTypes.array, PropTypes.object, ]), // innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]), header: PropTypes.string, color: PropTypes.string, footerSlot: PropTypes.node, text: PropTypes.string, }; export default CWidgetDropdown;