Files
nanocode/RetroUI/public/r/sonner.json
T
Ubuntu 32b43f85bd a
2026-07-03 16:58:28 +08:00

20 lines
1.8 KiB
JSON

{
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
"name": "sonner",
"type": "registry:component",
"title": "Sonner",
"description": "A beautiful toast component that can grab audience attention from any place.",
"dependencies": [
"sonner",
"lucide-react",
"class-variance-authority"
],
"files": [
{
"path": "components/retroui/Sonner.tsx",
"content": "\"use client\";\n\nimport { Toaster as Sonner } from \"sonner\";\n\ntype ToasterProps = React.ComponentProps<typeof Sonner>;\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n return (\n <Sonner\n toastOptions={{\n classNames: {\n toast:\n \"h-auto w-full p-4 bg-background border group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border flex items-center relative\",\n description:\n \"group-[.toast]:text-muted-foreground ml-2 text-sm font-sans\",\n actionButton:\n \"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground py-1 px-2 bg-background border-border shadow hover:shadow-xs hover:translate-[2px] duration-200 transition-all focus:shadow-none border-2 ml-auto h-fit min-w-fit\",\n cancelButton:\n \"group-[.toast]:bg-muted group-[.toast]:text-foreground py-1 px-2 text-sm bg-background border-border shadow hover:shadow-xs hover:translate-[2px] duration-200 transition-all focus:shadow-none border-2 ml-auto h-fit min-w-fit\",\n title: \"ml-2 font-sans\",\n closeButton:\n \"absolute bg-background -top-1 -left-1 rounded-full p-0.5\",\n },\n unstyled: true,\n }}\n {...props}\n />\n );\n};\n\nexport { Toaster };\n",
"type": "registry:component",
"target": "components/retroui/Sonner.tsx"
}
]
}