aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/ui/sonner.tsx
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswa Kalyan Bhuyan <[email protected]> 2025-05-28 16:30:40 +0530
committerLibravatarLibravatar Biswa Kalyan Bhuyan <[email protected]> 2025-05-28 16:35:58 +0530
commitfca2c25e12f5891e61f92e08815ddaa554f077d1 (patch)
treeae26861e30ecaf4611c20d4eca1d1922a011f7af /frontend/src/components/ui/sonner.tsx
parenta92719db37afc5cdf375f3ad5ce8e9602450ab2d (diff)
downloadblcklst-fca2c25e12f5891e61f92e08815ddaa554f077d1.tar.gz
blcklst-fca2c25e12f5891e61f92e08815ddaa554f077d1.tar.bz2
blcklst-fca2c25e12f5891e61f92e08815ddaa554f077d1.zip
feat: added frontpage layout
Diffstat (limited to 'frontend/src/components/ui/sonner.tsx')
-rw-r--r--frontend/src/components/ui/sonner.tsx25
1 files changed, 25 insertions, 0 deletions
diff --git a/frontend/src/components/ui/sonner.tsx b/frontend/src/components/ui/sonner.tsx
new file mode 100644
index 0000000..957524e
--- /dev/null
+++ b/frontend/src/components/ui/sonner.tsx
@@ -0,0 +1,25 @@
+"use client"
+
+import { useTheme } from "next-themes"
+import { Toaster as Sonner, ToasterProps } from "sonner"
+
+const Toaster = ({ ...props }: ToasterProps) => {
+ const { theme = "system" } = useTheme()
+
+ return (
+ <Sonner
+ theme={theme as ToasterProps["theme"]}
+ className="toaster group"
+ style={
+ {
+ "--normal-bg": "var(--popover)",
+ "--normal-text": "var(--popover-foreground)",
+ "--normal-border": "var(--border)",
+ } as React.CSSProperties
+ }
+ {...props}
+ />
+ )
+}
+
+export { Toaster }