Skip to content

Commit

Permalink
WB-1635.fix - Fix border issue on Button.secondary (#2124)
Browse files Browse the repository at this point in the history
## Summary:

In #2112, I introduced a new `labelStyle` prop and refactored the styles for the
secondary button. However, I missed a case where the border was not being
applied correctly, causing the button from being cut off in certain scenarios.
This PR fixes that issue by including the `border` in the resting/default state,
so the button is always rendered with a border (including that as part of
the box model).

NOTE: The issue was noticed while trying to integrate the changes in webapp.

<img width="621" alt="Screenshot 2023-11-15 at 6 00 42 PM" src="https://github.com/Khan/wonder-blocks/assets/843075/32f76420-1aff-47c9-ad34-cb4aa8976bff">

Issue: WB-1635

## Test plan:

Verify that the secondary button is rendered correctly in all scenarios. This
means that now secondary buttons will always have a border in the resting state.

Author: jandrade

Reviewers: jeresig

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Chromatic - Get results on regular PRs (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 2/2), ✅ Lint (ubuntu-latest, 16.x), ✅ Check build sizes (ubuntu-latest, 16.x), ✅ Test (ubuntu-latest, 16.x, 1/2), ✅ Chromatic - Build on regular PRs / chromatic (ubuntu-latest, 16.x), ⏭  Chromatic - Skip on Release PR (changesets), ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 16.x), ✅ gerald, ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 16.x), ⏭  dependabot

Pull Request URL: #2124
  • Loading branch information
jandrade authored Nov 17, 2023
1 parent 834abb9 commit 01593e2
Show file tree
Hide file tree
Showing 3 changed files with 162 additions and 82 deletions.
5 changes: 5 additions & 0 deletions .changeset/red-maps-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/wonder-blocks-button": patch
---

Fix border issue with secondary kind
Loading

0 comments on commit 01593e2

Please sign in to comment.