From d8d0039c44e8135b4629e5b7805973dcbba68da6 Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Wed, 20 Aug 2025 13:12:08 -0400 Subject: [PATCH] install 'sonner' toask --- bun.lock | 3 +++ package.json | 1 + src/components/ui/sonner.tsx | 25 +++++++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 src/components/ui/sonner.tsx diff --git a/bun.lock b/bun.lock index b3fdda0..08e6405 100644 --- a/bun.lock +++ b/bun.lock @@ -26,6 +26,7 @@ "postgres": "^3.4.7", "react": "19.1.0", "react-dom": "19.1.0", + "sonner": "^2.0.7", "tailwind-merge": "^3.3.1", }, "devDependencies": { @@ -953,6 +954,8 @@ "simple-swizzle": ["simple-swizzle@0.2.2", "", { "dependencies": { "is-arrayish": "^0.3.1" } }, "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg=="], + "sonner": ["sonner@2.0.7", "", { "peerDependencies": { "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" } }, "sha512-W6ZN4p58k8aDKA4XPcx2hpIQXBRAgyiWVkYhT7CvK6D3iAu7xjvVyhQHg2/iaKJZ1XVJ4r7XuwGL+WGEK37i9w=="], + "source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], "source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="], diff --git a/package.json b/package.json index ee6131d..687ed12 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "postgres": "^3.4.7", "react": "19.1.0", "react-dom": "19.1.0", + "sonner": "^2.0.7", "tailwind-merge": "^3.3.1" }, "devDependencies": { diff --git a/src/components/ui/sonner.tsx b/src/components/ui/sonner.tsx new file mode 100644 index 0000000..957524e --- /dev/null +++ b/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 ( + + ) +} + +export { Toaster }