import React, { FC, Fragment, ReactNode } from 'react'; import css from './index.module.css'; import SVGInfo from '../../assets/icons/icon-attention.svg'; import SVGClose from '../../assets/icons/close.svg'; import { MilaGridColumn, MilaGridContainer, MilaGridVoid } from '../../index'; export interface AlertProps { title?: string; text: ReactNode; backgroundColor?: string; isOpen?: boolean; isDismissable?: boolean; handleClose?: () => void; displayInfoIcon?: boolean; } const Alert: FC = ({ title, text, backgroundColor, isDismissable, isOpen, handleClose, displayInfoIcon, }) => { if (!isOpen) { return null; } return (
{isDismissable && ( )}
{displayInfoIcon && (
)}
{title &&

{title}

} {text}
); }; export default Alert;