Skip to content

Commit

Permalink
implementation Radix Toast
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-lemeur committed Oct 2, 2023
1 parent 5996624 commit 94a0df8
Show file tree
Hide file tree
Showing 5 changed files with 473 additions and 37 deletions.
319 changes: 318 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@
}
},
"dependencies": {
"@radix-ui/colors": "^3.0.0-rc.5",
"@radix-ui/react-toast": "^1.1.5",
"@xmldom/xmldom": "^0.8.10",
"classnames": "^2.3.2",
"commonmark": "^0.30.0",
Expand Down
19 changes: 19 additions & 0 deletions src/renderer/assets/styles/components/toasts.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
align-items: center;
animation-name: start;
animation-duration: 0.5s;
box-shadow: rgba(14, 18, 22, 0.35) 0px 10px 38px -10px, rgba(14, 18, 22, 0.2) 0px 10px 20px -15px;;

&:focus-within {
border-width: 4px;
Expand Down Expand Up @@ -94,3 +95,21 @@
.___DEBUG___COMPONENTS_TOASTS_CSS {
display: none;
}

.ToastRoot {
background-color: white;
border-radius: 6px;
box-shadow: hsl(206 22% 7% / 35%) 0px 10px 38px -10px, hsl(206 22% 7% / 20%) 0px 10px 20px -15px;
padding: 15px;
display: grid;
grid-template-areas: 'title action' 'description action';
grid-template-columns: auto max-content;
column-gap: 15px;
align-items: center;
}
.ToastRoot[data-state='open'] {
animation: slideIn 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
.ToastRoot[data-state='closed'] {
animation: hide 100ms ease-in;
}
Loading

0 comments on commit 94a0df8

Please sign in to comment.