mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-13 09:48:27 +03:00
26 lines
493 B
TypeScript
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>
|
|
));
|
|
}
|