feat: [DSRN] Added HeaderAlert#1064
Conversation
📖 Storybook Preview |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 03287fd. Configure here.
📖 Storybook Preview |
📖 Storybook Preview |
There was a problem hiding this comment.
Curious what the composition would be for this component and how it will be used. CurrentlyHeaderAlert omits children, which means if you want to show a title with the alert you have to put it as a Text component outside the header, as a sibling. The header and the title visually read as a unit, but in code they're disconnected. Should we be passing the title as children?
// Without children support — title is disconnected from the header
<HeaderAlert onClose={() => {}} severity={IconAlertSeverity.Error} />
<Text variant={TextVariant.HeadingSm}>Critical alert heading</Text>
// With children support — title belongs to the header
<HeaderAlert onClose={() => {}} severity={IconAlertSeverity.Error}>
Critical alert heading
</HeaderAlert>It might be helpful to see this component in the context of how it will be used e.g. BottomSheetAlert (old screenshot but UI should be similar to this)
@georgewrmarshall according to the design on the left the title will be outside of the header |
📖 Storybook Preview |
|
@brianacnguyen I hear you on the Figma spec showing them as separate rows — but I did an audit of the existing implementations in both extension and mobile, and both treat the alert icon + title as a single compositional unit, not disconnected siblings. Extension (
|
@amandaye0h what do you think? Including the title in the header component as well? |



Description
This pull request adds a new React Native HeaderAlert component in
@metamask/design-system-react-native. The header centers an IconAlert atIconSize.Lgon top of HeaderBase, matching the horizontal padding pattern used by HeaderStandard (px-2).Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-576
Manual testing steps
yarn storybook:iosoryarn storybook:androidper your setup).Screenshots/Recordings
Before
N/A — new component.
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-04-09.at.22.32.48.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Low risk: adds a new UI component plus Storybook coverage and unit tests, with minimal changes to existing exports and no sensitive logic.
Overview
Adds a new
HeaderAlertcomponent to@metamask/design-system-react-nativethat composesHeaderStandardand renders a centeredIconAlertatIconSize.Lg, exposingseverityand forwarding the remaining header action props.Exports the new component/types from the React Native package, adds a shared
HeaderAlertPropsSharedtype todesign-system-shared, and wires up Storybook stories plus unit tests to verify severity-to-color mapping and prop forwarding.Reviewed by Cursor Bugbot for commit 2dbdf2b. Bugbot is set up for automated code reviews on this repo. Configure here.