import React from "react"; import { Button } from "../../atoms/button"; import "./index.scss"; export interface ToastData { mainText: string; isImportant?: boolean; closeHandler?: React.MouseEventHandler; shortText?: string; buttonText?: string; buttonHandler?: React.MouseEventHandler; } export default function Toast({ isImportant, mainText, shortText, buttonText, buttonHandler, closeHandler = () => {}, }: ToastData) { return (
{shortText ? ( <> {mainText} {shortText} ) : ( {mainText} )}
{buttonText && buttonHandler ? ( ) : null}
); }