import React, { memo } from 'react'; import { areEqual } from 'Utils/equalityChecks'; import { CheckedMarkSvg } from 'Components/Icons/CheckedMark'; import classes from './contractFormsToast.module.css'; export interface Props { showToast: boolean; message: string; type?: 'success' | 'error'; } const ContractFormsToast = ({ showToast = false, message, type = 'success' }: Props) => { const getToastClass = () => (type === 'success' ? classes.toastSuccess : classes.toastWarning); return (
{message} {type === 'success' && ( )}
); }; ContractFormsToast.defaultProps = { type: 'success', }; const ContractFormsToastMemo = memo(ContractFormsToast, areEqual); export { ContractFormsToastMemo as ContractFormsToast };