import { arrayToClassName } from 'elementor-app/utils/utils.js'; import Text from 'elementor-app/ui/atoms/text'; import Icon from 'elementor-app/ui/atoms/icon'; import Grid from 'elementor-app/ui/grid/grid'; import './notice.scss'; const iconsClassesMap = { danger: 'eicon-warning', info: 'eicon-info-circle-o', warning: 'eicon-warning', }; export default function Notice( props ) { const baseClassName = 'eps-notice', classes = [ baseClassName, props.className ]; if ( props.color ) { classes.push( baseClassName + '-semantic', baseClassName + '--' + props.color ); } return ( { props.withIcon && props.color && } { props.label && { props.label + ' ' } } { props.children } { props.button && { props.button } } ); } Notice.propTypes = { className: PropTypes.string, color: PropTypes.string, label: PropTypes.string, children: PropTypes.any.isRequired, icon: PropTypes.string, withIcon: PropTypes.bool, button: PropTypes.object, }; Notice.defaultProps = { className: '', withIcon: true, button: null, };