Skip to content
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

feat: adding button icon to design system react #387

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

georgewrmarshall
Copy link
Contributor

@georgewrmarshall georgewrmarshall commented Jan 29, 2025

Description

This PR adds ButtonIcon component to the design system react.

Key features include:

  1. Three size variants (sm, md, lg)
  2. Support for floating/contained style
  3. Inverse color mode for dark backgrounds
  4. Built-in accessibility with required aria labels
  5. Comprehensive test coverage
  6. Full Storybook documentation

The component is built on top of our existing ButtonBase component and integrates with our Icon system.

Related issues

Fixes: #387

Manual testing steps

  1. Run Storybook (yarn storybook)
  2. Navigate to React Components/ButtonIcon
  3. Test different configurations:
    • Try all size variants (sm, md, lg)
    • Toggle floating mode
    • Toggle inverse mode on dark background
    • Verify disabled state
    • Check hover and active states
    • Check controls
    • Check accessibility tests

Screenshots/Recordings

Before

N/A - New component

After

after720.mov

Pre-merge author checklist

  • I've followed MetaMask Contributor Docs
  • I've completed the PR template to the best of my ability
  • I've included tests (100% coverage for ButtonIcon component)
  • I've documented my code using JSDoc format
  • I've applied the right labels on the PR

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.

@georgewrmarshall georgewrmarshall marked this pull request as ready for review January 29, 2025 23:39
@georgewrmarshall georgewrmarshall requested a review from a team as a code owner January 29, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant