-
Notifications
You must be signed in to change notification settings - Fork 118
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
frontend: add confirm action component via context #3230
Conversation
<TextField | ||
label="Confirmation" | ||
value={input} | ||
onChange={e => setInput(e.target.value)} | ||
fullWidth | ||
/> |
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.
We may want to leave this as part of the description. We may prefer to have to some workflows with a confirmation but not necessarily requiring an input, so that should be left up to the implementer.
if (input === confirmationText) { | ||
onConfirm(); | ||
} |
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.
We'll probably want to leave this to the implementer as well. We will likely want a generic reason field versus something specific, better auditing that way.
closed in favor of #3231 |
This pull request introduces a confirmation dialog component and integrates it into the existing wizard component. The main changes include the creation of the
ConfirmAction
component and the necessary modifications to theWizard
component to utilize this new dialog.Addition of Confirmation Dialog:
frontend/packages/wizard/src/confirm-action.tsx
: Created a newConfirmAction
component that displays a dialog with a confirmation text input and confirm/cancel buttons.Integration with Wizard Component:
frontend/packages/wizard/src/wizard.tsx
:useState
and the newConfirmAction
component. [1] [2]showConfirmAction
to configure and open theConfirmAction
dialog.ConfirmAction
component into theWizard
component's JSX, passing the necessary props and handling the confirm and cancel actions.