Open
Conversation
Contributor
📖 Storybook Preview |
Contributor
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 0438865. Configure here.
packages/design-system-react-native/src/components/TitleHub/TitleHub.tsx
Show resolved
Hide resolved
Contributor
📖 Storybook Preview |
Contributor
amandaye0h
requested changes
Apr 9, 2026
Contributor
amandaye0h
left a comment
There was a problem hiding this comment.
Added comments re: spacing and icon sizes
amandaye0h
reviewed
Apr 9, 2026
| import type { TitleHubProps } from './TitleHub.types'; | ||
|
|
||
| /** Pill badge: dot + label (e.g. network), for `titleAccessory`. */ | ||
| const TestnetBadge = () => ( |
Contributor
There was a problem hiding this comment.
Imo this testnet badge shouldn't be part of the docs, since it's visually dissimilar from the rest of the components in our library. We can include it temporarily, but it should be updated to a component with squareish borders.
Contributor
Author
There was a problem hiding this comment.
Added a TODO comment
Contributor
Author
Contributor
📖 Storybook Preview |
Contributor
📖 Storybook Preview |
Contributor
📖 Storybook Preview |
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.




Description
This PR adds TitleHub to
@metamask/design-system-react-native: a layout component for a title row, an optional amount line with optional amountAccessory, an optional bottom label row with bottomLabelAccessory, and an optional bottomAccessory when the bottom label row is not used.Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-674
Manual testing steps
yarn storybook:iosoryarn storybook:androidper your setup).Screenshots/Recordings
Before
After
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2026-04-07.at.23.26.18.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Low Risk
Adds a new, self-contained UI component with Storybook/docs/tests and only minor export surface changes; low risk outside of potential downstream typing/import adjustments.
Overview
Adds new
TitleHubcomponent to@metamask/design-system-react-native, providing a standardized left-aligned header block with a required title row plus optional amount, inline accessories, and either a bottom label row or a custom bottom accessory (mutually exclusive).Exposes new shared prop type
TitleHubPropsSharedfromdesign-system-shared, wiresTitleHubexports through the React Native component index, and registers a new Storybook story set. Includes a full README and comprehensive render/prop forwarding tests (includingtwClassName/styleand slot renderability rules).Reviewed by Cursor Bugbot for commit 0438865. Bugbot is set up for automated code reviews on this repo. Configure here.