21 lines
564 B
TypeScript
21 lines
564 B
TypeScript
|
|
import { Toaster as Sonner, toast } from "sonner";
|
||
|
|
|
||
|
|
/** Pre-themed sonner Toaster. Drop <Toaster /> once near your app root. */
|
||
|
|
export const Toaster = (props: React.ComponentProps<typeof Sonner>) => (
|
||
|
|
<Sonner
|
||
|
|
theme="dark"
|
||
|
|
position="bottom-right"
|
||
|
|
toastOptions={{
|
||
|
|
classNames: {
|
||
|
|
toast: "!bg-surface !border-border !text-text !rounded-lg !shadow-lg",
|
||
|
|
description: "!text-muted",
|
||
|
|
actionButton: "!bg-brand !text-bg",
|
||
|
|
cancelButton: "!bg-surface-2 !text-muted",
|
||
|
|
},
|
||
|
|
}}
|
||
|
|
{...props}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
|
||
|
|
export { toast };
|