Skip to content

Commit

Permalink
fix: prevent clashing styles
Browse files Browse the repository at this point in the history
  • Loading branch information
RobChangCA committed Sep 27, 2024
1 parent 80850bd commit 385e539
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 7 additions & 7 deletions examples/ui-demo/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
}

/* Radix Toast Animations */
@keyframes slideIn {
from {
@keyframes slideInToast {
from {
transform: translateY(100%);
opacity: 0;
}
Expand All @@ -107,7 +107,7 @@
}
}

@keyframes hide {
@keyframes hideToast {
from {
transform: translateY(0%);
opacity: 1;
Expand All @@ -118,10 +118,10 @@
}
}

[data-state="open"] {
animation: slideIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
#toast[data-state="open"] {
animation: slideInToast 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-state="closed"] {
animation: hide 100ms ease-in forwards;
#toast[data-state="closed"] {
animation: hideToast 100ms ease-in forwards;
}
3 changes: 2 additions & 1 deletion examples/ui-demo/src/components/shared/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ export const Toast = ({ text, open, setOpen, type }: ToastProps) => {

return (
<>
<Root
<Root
id="toast"
open={open}
onOpenChange={setOpen}
className={`${getBGColor()} align-middle rounded-lg shadow-lg px-3 py-2 flex justify-center items-center`}
Expand Down

0 comments on commit 385e539

Please sign in to comment.