-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(ModalPresence): add higher-order function #20826
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
base: main
Are you sure you want to change the base?
feat(ModalPresence): add higher-order function #20826
Conversation
|
I have not added tests, since it's simply calling |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20826 +/- ##
==========================================
+ Coverage 92.46% 97.19% +4.73%
==========================================
Files 508 151 -357
Lines 35753 21294 -14459
Branches 5673 815 -4858
==========================================
- Hits 33058 20697 -12361
+ Misses 2550 589 -1961
+ Partials 145 8 -137
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
emyarod
left a comment
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.
looks good to me!
If you wanted to apply
ModalPresenceto a shared modal, you had to either individually wrap your component for every occurrence:or compose your modal differently:
To improve the DX, this PR adds higher-order functions for both
ModalPresenceandComposedModalPresence:This helps maintaining re-usability while improving DX.
Changelog
New
Testing / Reviewing
withModalPresencePR Checklist
As the author of this PR, before marking ready for review, confirm you:
Wrote passing tests that cover this changeMore details can be found in the pull request guide