Add destructive variant and rich description support to ConfirmationDialog - #2420
Merged
Merged
Conversation
…ialog Sync ConfirmationDialog with the internal repo: confirmButtonVariant prop, ReactNode description, and the headerLeading/className props from the earlier launch-confirmation work that were not previously extracted. Adds unit tests for the component (new file in this repo). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates packages/ui-components’ ConfirmationDialog to match the internal version used for campaign deletion flows, expanding the component API to support richer header and button styling while remaining compatible with existing string-based callers.
Changes:
- Add
confirmButtonVariantto allow rendering the confirm button with existingButtonvariants (e.g.destructive). - Widen
descriptionfromstringtoReactNode, and addheaderLeading+classNamesupport for richer header layouts. - Add unit tests covering
headerLeading, rich description rendering, confirm/cancel callbacks, and destructive button styling.
Review Summary
Blocking: None
Non-blocking: None
Merge recommendation: Ready to merge
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/ui-components/src/components/confirmation-dialog/confirmation-dialog.tsx | Expands ConfirmationDialog props for header leading content, rich description, confirm button variant, and className passthrough. |
| packages/ui-components/src/components/confirmation-dialog/confirmation-dialog.test.tsx | Adds RTL/Jest coverage for the new props and expected confirm/cancel behaviors. |
MarceloRGonc
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Part of OPS-4226.
Syncs
ConfirmationDialogwith its internal counterpart, which now uses it for the delete-campaign confirmation:confirmButtonVariantprop so the confirm button can render asdestructive(uses the existing Button variants — no inline style overrides)descriptionwidened fromstringtoReactNodeso callers can emphasize parts of the message (e.g. a highlighted savings amount). Non-breaking: string callers are unaffectedheaderLeading(leading visual beside title/description) andclassNameprops that were not previously extracted to this repoAdditional Notes
Component-only change; no consumers in this repo currently pass the new props.
Testing Checklist
Check all that apply:
I tested the feature thoroughly, including edge cases
I verified all affected areas still work as expected (ui-components tests, react-ui typecheck)
Automated tests were added/updated if necessary
Changes are backwards compatible with any existing data, otherwise a migration script is provided
🤖 Generated with Claude Code