feat: migrate Button (card scope)#27752
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
45d5661 to
bfcfeb7
Compare
998b6e9 to
52809c5
Compare
52809c5 to
66e6d97
Compare
🔍 Smart E2E Test Selection⏭️ Smart E2E selection skipped - draft PR All E2E tests pre-selected. |
|
✅ E2E Fixture Validation — Schema is up to date |
|
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.
| width={ButtonWidthTypes.Full} | ||
| disabled={!isSwapEnabledForPriorityToken} | ||
| isFullWidth | ||
| isDisabled={!isSwapEnabledForPriorityToken} |
There was a problem hiding this comment.
Redundant opacity styling doubles disabled visual handling
Low Severity
The add funds Button now uses the DSRN isDisabled prop, which automatically applies opacity: 0.5 when disabled. The manually applied 'opacity-50' tailwind class via style={tw.style('w-1/2', !isSwapEnabledForPriorityToken && 'opacity-50')} is now redundant. While React Native style array overrides prevent a visual double-opacity bug, this redundant logic is misleading and could cause confusion if the DSRN Button's disabled opacity behavior ever changes.





Description
Replace deprecated
Buttonusage with DSRN package.Changelog
CHANGELOG entry: null
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/DSYS-445
Manual testing steps
Screenshots/Recordings
Before
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-25.at.14.07.15.mov
After
Simulator.Screen.Recording.-.iPhone.17.Pro.-.2026-03-25.at.14.08.38.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Medium Risk
Touches many card/onboarding screens to swap a core UI component; while mostly prop/markup changes, subtle differences in disabled/loading/accessibility behavior could affect user flows and tests.
Overview
Migrates card-related screens/components from the deprecated component-library
Buttonto the design-system@metamask/design-system-react-nativeButton(e.g., auth, home, cashback, checkout/onboarding, spending limit, message box, and dev options).Updates callsites to the new API (
variantenums,isLoading,isDisabled,isFullWidth, and children-based labels) and adjusts tests/snapshots accordingly (including assertions usingtoBeDisabled/toBeEnabledand checkingaccessibilityState.busy).Written by Cursor Bugbot for commit 66e6d97. This will update automatically on new commits. Configure here.