Files
zkldi_Tachi/client/src/util/toaster.tsx
T

26 lines
493 B
TypeScript

import Icon from "components/util/Icon";
import React from "react";
import toast from "react-hot-toast";
export function SendErrorToast(text: string) {
toast.error((t) => (
<div>
{text}{" "}
<span onClick={() => toast.dismiss(t.id)}>
<Icon type="times" />
</span>
</div>
));
}
export function SendSuccessToast(text: string) {
toast.success((t) => (
<div>
{text}{" "}
<span onClick={() => toast.dismiss(t.id)}>
<Icon type="times" />
</span>
</div>
));
}