Export "toast" from Sonner's component to avoid needing to install Sonner directly

This commit is contained in:
gbuomprisco
2025-01-17 14:24:00 +07:00
parent 41193e5697
commit 7d86fed7a4

View File

@@ -1,7 +1,7 @@
'use client'; 'use client';
import { useTheme } from 'next-themes'; import { useTheme } from 'next-themes';
import { Toaster as Sonner } from 'sonner'; import { Toaster as Sonner, toast } from 'sonner';
type ToasterProps = React.ComponentProps<typeof Sonner>; type ToasterProps = React.ComponentProps<typeof Sonner>;
@@ -28,4 +28,4 @@ const Toaster = ({ ...props }: ToasterProps) => {
); );
}; };
export { Toaster }; export { Toaster, toast };