docs(modal-wrapper): remove invalid prop, fix renderTriggerButtonIcon knob #4830
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ModalWrapper
demo in the React storybook environment has an invalid proptriggerButtonIcon
being passed to it.Error text:
This demo also has a default value of
'none'
for therenderTriggerButtonIcon
on page load, which is an invalid value & generates a console error in local development. (The error goes away when you use knobs to select an icon, because then the value being passed changes from'none'
to a valid icon).Text of two console errors on page load:
This PR proposes removing the invalid prop
triggerButtonIcon
and also updating therenderTriggerButtonIcon
prop's knob logic so that, on page load,renderTriggerButtonIcon={undefined}
(valid) and notrenderTriggerButtonIco='none'
(invalid)Changelog
Changed
renderTriggerButtonIcon
prop knob. Now it will berenderTriggerButtonIcon={undefined}
(valid) on page load, and notrenderTriggerButtonIco='none'
(invalid)Removed
triggerButtonIcon
(not a valid prop)Testing / Reviewing
I suggest running the storybook locally, and viewing the console in Chrome.