Skip to content

Conversation

@karanmonu
Copy link

@karanmonu karanmonu commented Jun 21, 2025

Motivation

This PR replaces the hardcoded +2 value in paddingHorizontal of the Button component with a token-based value theme.spacing.xs. This improves design consistency and removes magic numbers.

Fixes #

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Checked in example app manually

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation using yarn docs-build-api (Not applicable)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works (Not required for this style-level fix)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules (Not applicable)

Additional context

This is a small change but helps with tokenized styling and removes design inconsistency due to hardcoded spacing.

@theianmay theianmay added the component: Button Issue related to Button Component label Oct 22, 2025
@theianmay
Copy link
Member

theianmay commented Oct 22, 2025

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 react-native-vector-icons.

EDIT: Removed link issue manually, as this is a small refactor I will merge in

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.29%. Comparing base (a08a24d) to head (deb5834).
⚠️ Report is 5 commits behind head on next.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theianmay theianmay merged commit a4a6d13 into react-native-elements:next Nov 15, 2025
9 checks passed
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
@theianmay theianmay added this to the v5.0.0 milestone Nov 16, 2025
@github-project-automation github-project-automation bot moved this to Closed or Merged 🏁 in Community Roadmap 🛣 Nov 16, 2025
@theianmay theianmay self-requested a review December 5, 2025 06:47
Copy link
Member

@theianmay theianmay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: Button Issue related to Button Component

Projects

Status: Closed or Merged 🏁

Development

Successfully merging this pull request may close these issues.

3 participants