openpanel/packages/cli/templates/provider/demo-notification-provider.tsx
Stefan Pejcic 8595a9f4e5 back
2024-05-08 19:58:53 +02:00

33 lines
769 B
TypeScript

import { NotificationProvider } from "@refinedev/core";
/**
* Check out the Notification Provider documentation for detailed information
* https://refine.dev/docs/api-reference/core/providers/notification-provider/
**/
export const notificationProvider: NotificationProvider = {
open: ({
message,
type,
description,
key,
cancelMutation,
undoableTimeout,
}) => {
console.log("open", {
message,
type,
description,
key,
cancelMutation,
undoableTimeout,
});
// TODO: open the notification
},
close: (key: string) => {
console.log("close", { key });
// TODO: close the notification
},
};