-
Notifications
You must be signed in to change notification settings - Fork 59
Toasts
MorganeLecurieux edited this page Mar 15, 2022
·
2 revisions
Toasts are at the root of the app. They can be called anywhere in the app as they're "stored" in the apollo cache.
You can use them as follow :
import { addToast } from "~/core/apolloClient";
// In you component
addToast({
message: "I am a super toast",
severity: "info",
autoDismiss: false,
});
// In the need of using only a translation key
addToast({
message: "Whatever I will be override",
severity: "danger",
translateKey: "core:utils:translation-key",
});
Severity can either be info
, success
or danger
.
You can find the code here