Download src/components/ui/sonner.tsx from Jessedbrown/daisy-client: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/Jessedbrown/daisy-client/resolve/main/src/components/ui/sonner.tsx
- Command line
-
hf download hf://Jessedbrown/daisy-client/src/components/ui/sonner.tsx
-
curl -L -o sonner.tsx https://huggingface.co/Jessedbrown/daisy-client/resolve/main/src/components/ui/sonner.tsx
1.3 kB
| import { Toaster as Sonner } from 'sonner'; | |
| type ToasterProps = React.ComponentProps<typeof Sonner>; | |
| const Toaster = ({ ...props }: ToasterProps) => { | |
| return ( | |
| <Sonner | |
| theme="light" | |
| className="toaster group" | |
| toastOptions={{ | |
| classNames: { | |
| toast: | |
| 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg', | |
| description: 'group-[.toast]:text-muted-foreground', | |
| actionButton: | |
| 'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground', | |
| cancelButton: | |
| 'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground', | |
| error: | |
| 'group-[.toaster]:bg-destructive group-[.toaster]:text-destructive-foreground group-[.toaster]:border-destructive', | |
| success: | |
| 'group-[.toaster]:bg-success group-[.toaster]:text-success-foreground group-[.toaster]:border-success', | |
| warning: | |
| 'group-[.toaster]:bg-warning group-[.toaster]:text-warning-foreground group-[.toaster]:border-warning', | |
| info: 'group-[.toaster]:bg-info group-[.toaster]:text-info-foreground group-[.toaster]:border-info', | |
| }, | |
| }} | |
| {...props} | |
| /> | |
| ); | |
| }; | |
| export { Toaster }; | |