Skip to content

[React Native]: Create Box component in shared UI component library #706

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

Closed
brianacnguyen opened this issue May 28, 2025 · 0 comments · Fixed by #725
Closed

[React Native]: Create Box component in shared UI component library #706

brianacnguyen opened this issue May 28, 2025 · 0 comments · Fixed by #725
Assignees

Comments

@brianacnguyen
Copy link
Contributor

brianacnguyen commented May 28, 2025

Description

Create a reusable Box component for the shared UI component library. This task is part of the migration to the new shared UI component library, ensuring consistency with the conventions set by existing components.

Technical Details

  • Component Implementation:

    • Build using React Native and TypeScript.
  • Integration:

    • Ensure compatibility with twrnc or any relevant design system tokens (e.g., spacing, colors, typography).
  • Testing:

    • Integrate unit tests using Jest and React Testing Library.
    • Add accessibility tests to ensure ARIA compliance for keyboard and screen reader users.
  • Documentation:

    • Provide detailed usage examples for different variants, sizes, and states.
    • Include a storybook story for each prop and for default configurations.

Acceptance Criteria

  • Component implementation must cover the following:
    • Proper alignment with typography and spacing standards.
    • Compatibility with all design system color tokens and themes.
    • Inclusion of hover, focus, and active states.
  • Unit tests must cover at least 80% of the component’s functionality, including interactivity and accessibility.
  • Component must be reviewed and approved by both engineering and design teams.
  • Documentation for the component should be added, covering usage, available props, and examples.
  • Ensure all aspects meet the Definition of Done.

References

@brianacnguyen brianacnguyen self-assigned this May 28, 2025
@brianacnguyen brianacnguyen changed the title Copy of [React Native]: Create Checkbox component in shared UI component library [React Native]: Create Box component in shared UI component library May 28, 2025
georgewrmarshall added a commit that referenced this issue Jun 6, 2025
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**
This PR adds the `Box` component to the
`@metamask/design-system-react-native` package
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->

## **Related issues**

Fixes: #706 

## **Manual testing steps**

1. Run `yarn storybook:ios`
2. Go to Components > Box
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

https://github.com/user-attachments/assets/966a4fd6-3e66-4739-bd44-2ac0d2a311a9

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: George Marshall <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant