Skip to content

Commit

Permalink
fix(Sonner): restore old styling
Browse files Browse the repository at this point in the history
  • Loading branch information
zaaakher committed May 28, 2024
1 parent 43331d1 commit e961dee
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/components/elements/sonner/Sonner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const Sonner = ({ ...props }: SonnerProps) => {
toastOptions={{
classNames: {
toast:
"group toast group-[.toaster]:hawa-bg-background group-[.toaster]:hawa-text-foreground group-[.toaster]:hawa-border-border group-[.toaster]:hawa-shadow-lg hawa-flex hawa-flex-row hawa-justify-between",
"group toast group-[.toaster]:hawa-bg-background group-[.toaster]:hawa-text-foreground group-[.toaster]:hawa-border-border group-[.toaster]:hawa-shadow-lg",
description: "group-[.toast]:hawa-text-muted-foreground",
actionButton:
"group-[.toast]:hawa-bg-primary group-[.toast]:hawa-text-primary-foreground",
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sikka/hawa",
"version": "0.38.11",
"version": "0.38.12",
"description": "Modern UI Kit made with Tailwind",
"author": {
"name": "Sikka Software",
Expand Down
42 changes: 37 additions & 5 deletions packages/storybook/stories/ElementsStories/Sonner.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,47 @@ export const Default: Story = {
// });
},
},
{
label: "Custom Action",
value: "success",
action: () => {
createSonner.error("error", {
description: "Invoice creattion error",

action: <Button>Preview</Button>,
});
},
},
{
label: "Error With Action",
value: "success",
action: () => {
createSonner.error("error", {
description: "Invoice creattion error",
action: {
// label: <Button>Preview</Button>,
label: "Preview",
onClick: () => console.log("Preview"),
children: <Button>Preview</Button>,
},
});
},
},
{
label: "Error",
value: "success",
action: () => {
createSonner.error("error", {
description: "Invoice creattion error",
});
},
},
{
label: "Success",
value: "success",
action: () => {
toast({
title:
"Scheduled: Catch up " + Math.floor(Math.random() * 100),
description: "Friday, February 10, 2023 at 5:57 PM",
severity: "success",
createSonner.error("error", {
description: "Invoice creattion error",
});
},
},
Expand Down

0 comments on commit e961dee

Please sign in to comment.