25 lines
661 B
TypeScript
25 lines
661 B
TypeScript
import { Toaster as Sonner } from "sonner";
|
|||
|
|
|
||
|
|
type ToasterProps = React.ComponentProps<typeof Sonner>;
|
||
|
|
|
||
|
|
function Toaster({ ...props }: ToasterProps) {
|
||
|
|
return (
|
||
|
|
<Sonner
|
||
|
|
theme="dark"
|
||
|
|
position="bottom-right"
|
||
|
|
richColors
|
||
|
|
closeButton
|
||
|
|
style={{ fontFamily: '"Poppins", system-ui, sans-serif' }}
|
||
|
|
toastOptions={{
|
||
|
|
classNames: {
|
||
|
|
toast:
|
||
|
|
"group toast group-[.toaster]:bg-card group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",
|
||
|
|
description: "group-[.toast]:text-muted-foreground",
|
||
|
|
},
|
||
|
|
}}
|
||
|
|
{...props}
|
||
|
|
/>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
|
||
|
|
export { Toaster };
|