fix: replace magic number with spacing token in Button component#3978
Merged
theianmay merged 3 commits intoreact-native-elements:nextfrom Nov 15, 2025
Merged
fix: replace magic number with spacing token in Button component#3978theianmay merged 3 commits intoreact-native-elements:nextfrom
theianmay merged 3 commits intoreact-native-elements:nextfrom
Conversation
Member
|
Hello @karanmonu, thank you for this contribution! Can you please clarify how this PR fixes issue #3625? It looks like this PR is related to the Button component, while that referenced issue is related to EDIT: Removed link issue manually, as this is a small refactor I will merge in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## next #3978 +/- ##
=======================================
Coverage 79.29% 79.29%
=======================================
Files 90 90
Lines 2144 2144
Branches 959 957 -2
=======================================
Hits 1700 1700
Misses 442 442
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
github-actions bot
pushed a commit
that referenced
this pull request
Nov 15, 2025
fix: replace magic number with spacing token in Button component
github-actions bot
pushed a commit
that referenced
this pull request
Nov 15, 2025
fix: replace magic number with spacing token in Button component
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.
Motivation
This PR replaces the hardcoded
+2value inpaddingHorizontalof theButtoncomponent with a token-based valuetheme.spacing.xs. This improves design consistency and removes magic numbers.Fixes #
Type of change
How Has This Been Tested?
exampleapp manuallyChecklist
yarn docs-build-api(Not applicable)Additional context
This is a small change but helps with tokenized styling and removes design inconsistency due to hardcoded spacing.