-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(Modal): implement support for 3 button modals #7775
feat(Modal): implement support for 3 button modals #7775
Conversation
Deploy preview for carbon-elements ready! Built with commit fcc0143 |
Deploy preview for carbon-components-react ready! Built without sensitive environment variables with commit fcc0143 https://deploy-preview-7775--carbon-components-react.netlify.app |
819b9ca
to
1bb7ece
Compare
modified button text vertical alignment for 3 button modals only after discussion with @aagonzales |
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 fixing the button text. Looks good!
Looks really great! Do you think we can add a quick blurb to the |
1bb7ece
to
3dfdc1d
Compare
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.
LGTM 👍 ✅ 🎉
cb9a3d0
to
58713ff
Compare
341d4cc
to
2ef643a
Compare
(tests will be updated when we have confirmed if the API changes are good to go)
--
Related #4607
This PR adds support for 3 button modals according to the latest modal spec. Since our existing Modal API expects only 1 primary and 1 secondary button, a
secondaryButtons
prop is introduced which can be used in place of thesecondaryButtonText
andonSecondarySubmit
props. ThesecondaryButtons
prop expects an array of up to 2 objects with the following shape:if an
onClick
handler is not supplied to the secondary buttons in aComposedModal
it will fall back to the internalhandleRequestClose
method by defaultChangelog
New
secondaryButtons
propTesting / Reviewing
Confirm the 3 button modal styles appear correct and there are no visual regressions with existing supported modal styles