Skip to content

Commit 57e349f

Browse files
committed
fix(): Sonner toast styles.
1 parent 7cc8022 commit 57e349f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/shadcn/ui/sonner.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ export const SonnerToast = ({ ...props }: ToasterProps) => {
2020
actionButton:
2121
"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",
2222
cancelButton:
23-
"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground",
24-
},
23+
"group-[.toaster]:bg-muted group-[.toaster]:text-muted-foreground bg-red",
24+
25+
closeButton:
26+
"group-[.toaster]:bg-muted group-[.toaster]:border-border group-[.toaster]:text-foreground bg-red group-[.toaster]:hover:text-background",
27+
},
2528
}}
2629
{...props}
2730
/>

stories/shadcn/sonner.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as sonner from 'sonner'
55
const SonnerDemo = () => {
66
return (
77
<div>
8-
<SonnerToast closeButton duration={1}>
8+
<SonnerToast closeButton duration={9000000}>
99

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

0 commit comments

Comments
 (0)