import Icon from '../../shared/components/icon'; import React from 'react'; import { buildClassName } from '../../shared/utils/class-util'; interface MessageProps { type: 'error' | 'success'; title: string; actionComponent?: JSX.Element; children?: JSX.Element | JSX.Element[]; } const Message: React.FC = ({ type, title, actionComponent, children }) => (
{type === 'error' && }

{title}

{children}
{actionComponent &&
{actionComponent}
}
); export default Message;