Skip to content

Fix Alert explanation wrapper for rich children - #612

Closed
arpitjain099 wants to merge 1 commit into
cfpb:mainfrom
arpitjain099:chore/fix-alert-children-warning-317
Closed

Fix Alert explanation wrapper for rich children#612
arpitjain099 wants to merge 1 commit into
cfpb:mainfrom
arpitjain099:chore/fix-alert-children-warning-317

Conversation

@arpitjain099

Copy link
Copy Markdown
Contributor

Fixes #317.

This keeps plain text explanations rendered as a paragraph, but switches rich children to a div wrapper so consumers can pass lists or other block content without React nesting warnings.

I also added regression tests for both text and rich explanation content.

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
flacoman91 added a commit that referenced this pull request Jul 22, 2026
This is the same as #612 from but with fixed merge conflicts.

This looks good! thank you @arpitjain099

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
Co-authored-by: Arpit Jain <arpitjain099@gmail.com>
@flacoman91

Copy link
Copy Markdown
Collaborator

Thanks @arpitjain099 . the fix is in #626

@flacoman91 flacoman91 closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Alert] React Warning - Children of <p>

2 participants