Export "toast" from Sonner's component to avoid needing to install Sonner directly
This commit is contained in:
@@ -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 };
|
||||||
|
|||||||
Reference in New Issue
Block a user