-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[core] feat(MultistepDialog): allow custom next/back button props per step #4610
[core] feat(MultistepDialog): allow custom next/back button props per step #4610
Conversation
const dialog = mount( | ||
<MultistepDialog nextButtonProps={getNextButtonProps} isOpen={true} usePortal={false}> | ||
<DialogStep id="one" title="Step 1" panel={<Panel />} /> | ||
<DialogStep id="two" title="Step 2" panel={<Panel />} /> |
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.
hmm, on second thought, I think a better API would look like this:
<DialogStep id="two" title="Step 2" panel={<Panel />} nextButtonProps={{ disabled: true }} />
since we're calling this.getDialogStepChildren()
and accessing each DialogStep's props while rendering the buttons anyway... we can make the API more straightforward and ergonomic this way
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.
Done
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 making those changes
Fixes #4579
Checklist
Changes proposed in this pull request:
Provide a way to pass a callback to
backButtonProps
andnextButtonProps