-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Update NotificationToast provider with position and className props #2577
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: e88777e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2577 +/- ##
=======================================
Coverage 88.16% 88.16%
=======================================
Files 204 204
Lines 22320 22331 +11
Branches 1490 1490
=======================================
+ Hits 19678 19689 +11
Misses 2590 2590
Partials 52 52
|
packages/circuit-ui/components/ToastContext/ToastContext.module.css
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationToast/NotificationToast.stories.tsx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationToast/NotificationToast.mdx
Outdated
Show resolved
Hide resolved
packages/circuit-ui/components/NotificationToast/NotificationToast.mdx
Outdated
Show resolved
Hide resolved
Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com>
Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com>
Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! 🙌🏻
Addresses WPS-207.
Purpose
In certain applications (e.g. shop or marketing website) it's necessary to change the placement of NotificationToast (e.g. put it closer to shopping cart). Unfortunately current implementation displays NotificationToasts only at the bottom of a page. This PR extends NotificationToast position possibilities by providing a prop that can place NotificationToast at the top and at the top right corner of a page.
Approach and changes
position
prop toToastProvider
withbottom
,top
andtop-right
as possible values (usebottom
as default value)className
prop toToastProvider
to allow slight modifications (e.g. using bigger CSS space variable for a position)Definition of done