-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add ModalFrontstageButton
component
#1156
Conversation
@Mergifyio backport release/5.0.x |
✅ Backports have been created
|
Instead/in addition to this, is it possible to add a 'onBeforeExit' kind of event on the button click which users can handle via their provided function, and are able to cancel the back button operation if required. |
You can do that in a custom |
This story looks exactly like my use case. |
* Ability to override backButton of a modal frontstage. * Add ModalFrontstageButton * Remove unused BackButton * rush change * NextVersion.md * Extract API * Update snaps (cherry picked from commit b8a94f9) # Conflicts: # docs/changehistory/NextVersion.md # ui/appui-react/src/appui-react/layout/widget/tools/button/Back.tsx
* Add `ModalFrontstageButton` component (#1156) * Ability to override backButton of a modal frontstage. * Add ModalFrontstageButton * Remove unused BackButton * rush change * NextVersion.md * Extract API * Update snaps (cherry picked from commit b8a94f9) # Conflicts: # docs/changehistory/NextVersion.md # ui/appui-react/src/appui-react/layout/widget/tools/button/Back.tsx * Merge conflicts. --------- Co-authored-by: GerardasB <[email protected]>
Changes
This PR adds
backButton
property toModalFrontstageInfo
interface to allow specifying of a custom back button for a modal frontstage. AdditionallyModalFrontstageButton
component is added to maintain visual consistency between modal frontstages.ModalFrontstageButton
uses iTwinUIIconButton
instead of outdated custom implementation.Additionally,
ModalFrontstageButton
is used as a default back button if nobackButton
is provided viaModalFrontstageInfo
.Testing
Added additional story.