-
Notifications
You must be signed in to change notification settings - Fork 4k
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
breaking(Modal): update shorthand functionality #1599
Conversation
/** Elements to render as Modal action buttons. */ | ||
actions: PropTypes.arrayOf(customPropTypes.itemShorthand), | ||
/** Shorthand for Modal.Actions. Typically an array of button shorthand. */ | ||
actions: customPropTypes.itemShorthand, |
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.
I'm not sure about this change. I think that we should use there customPropTypes.collectionShorthand
.
src/modules/Modal/Modal.js
Outdated
PropTypes.bool, | ||
]), | ||
/** Shorthand for the close icon. Closes the modal on click. */ | ||
closeIcon: customPropTypes.itemShorthand, |
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.
customPropTypes.itemShorthand
disallows usage of this prop with children
. If we will make this change, we should also make changes in the render
method.
Codecov Report
@@ Coverage Diff @@
## master #1599 +/- ##
======================================
Coverage 99.8% 99.8%
======================================
Files 148 148
Lines 2590 2590
======================================
Hits 2585 2585
Misses 5 5
Continue to review full report at Codecov.
|
I've pushed some changes there:
TODO
@levithomason I'll be glad to hear your thoughts. |
ping |
6e04023
to
36b7136
Compare
I've rebased to the latest master and resolved all issues:
Updated |
Released in |
Breaking Changes
Previously, shorthand Modal
actions
required passing button props objects withtriggerClose: true
on buttons that should close the Modal.Now, all shorthand Modal
actions
buttons close the Modal automatically. ThetriggerClose
property has been removed.Before
After
Blocking #1542
This PR:
triggerClose
shorthand Modalactions
property