Skip to content

Commit

Permalink
fix(): Sonner toast styles.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Feb 26, 2024
1 parent 7cc8022 commit 57e349f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/shadcn/ui/sonner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ export const SonnerToast = ({ ...props }: ToasterProps) => {
actionButton:
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
cancelButton:
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
},
"group-[.toaster]:bg-muted group-[.toaster]:text-muted-foreground bg-red",

closeButton:
"group-[.toaster]:bg-muted group-[.toaster]:border-border group-[.toaster]:text-foreground bg-red group-[.toaster]:hover:text-background",
},
}}
{...props}
/>
Expand Down
2 changes: 1 addition & 1 deletion stories/shadcn/sonner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as sonner from 'sonner'
const SonnerDemo = () => {
return (
<div>
<SonnerToast closeButton duration={1}>
<SonnerToast closeButton duration={9000000}>

</SonnerToast>
<Button onClick={() => sonner.toast.success('Success!')}>Show Toast</Button> </div>
Expand Down

0 comments on commit 57e349f

Please sign in to comment.