Skip to content

Commit

Permalink
fix: dark mode for close button (#531)
Browse files Browse the repository at this point in the history
* Add dark mode styling for close button

* Rerun failing test
  • Loading branch information
hunterrmartinn authored Jan 15, 2025
1 parent b127760 commit 5534dad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,9 @@

[data-sonner-toaster][data-theme='dark'] {
--normal-bg: #000;
--normal-bg-hover: hsl(0, 0%, 12%);
--normal-border: hsl(0, 0%, 20%);
--normal-border-hover: hsl(0, 0%, 25%);
--normal-text: var(--gray1);

--success-bg: hsl(150, 100%, 6%);
Expand All @@ -460,6 +462,17 @@
--error-text: hsl(358, 100%, 81%);
}

[data-sonner-toaster][data-theme='dark'] [data-sonner-toast] [data-close-button] {
background: var(--normal-bg);
border-color: var(--normal-border);
color: var(--normal-text);
}

[data-sonner-toaster][data-theme='dark'] [data-sonner-toast] [data-close-button]:hover {
background: var(--normal-bg-hover);
border-color: var(--normal-border-hover);
}

[data-rich-colors='true'][data-sonner-toast][data-type='success'] {
background: var(--success-bg);
border-color: var(--success-border);
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Position/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const Position = ({
setPosition(position);
removeAllToasts();
}

toast('Event has been created', {
description: 'Monday, January 3rd at 6:00pm',
});
Expand Down

0 comments on commit 5534dad

Please sign in to comment.