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

Bug fix: ButtonBase sx base styles leaking into CSS modules feat flag #5212

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lazy-crews-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix: `ButtonBase` sx base styles leaking into CSS modules feat flag
29 changes: 12 additions & 17 deletions packages/react/src/Button/ButtonBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
>
<Box
as={Component}
sx={sxStyles}
sx={sxProp}
aria-disabled={loading ? true : undefined}
{...rest}
ref={innerRef}
Expand Down Expand Up @@ -198,13 +198,13 @@
true,
)
: TrailingVisual
? renderModuleVisual(
TrailingVisual,
Boolean(loading) && !LeadingVisual,
'trailingVisual',
false,
)
: null
? renderModuleVisual(

Check failure on line 201 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
TrailingVisual,

Check failure on line 202 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
Boolean(loading) && !LeadingVisual,

Check failure on line 203 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
'trailingVisual',

Check failure on line 204 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `····························` with `······························`
false,

Check failure on line 205 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
)

Check failure on line 206 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: null

Check failure on line 207 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
}
</Box>
{
Expand Down Expand Up @@ -314,13 +314,8 @@
true,
)
: TrailingVisual
? renderModuleVisual(
TrailingVisual,
Boolean(loading) && !LeadingVisual,
'trailingVisual',
false,
)
: null
? renderModuleVisual(TrailingVisual, Boolean(loading) && !LeadingVisual, 'trailingVisual', false)

Check failure on line 317 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `?·renderModuleVisual(TrailingVisual,·Boolean(loading)·&&·!LeadingVisual,·'trailingVisual',·false` with `··?·renderModuleVisual(⏎····························TrailingVisual,⏎····························Boolean(loading)·&&·!LeadingVisual,⏎····························'trailingVisual',⏎····························false,⏎··························`
: null

Check failure on line 318 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
}
</span>
{
Expand Down Expand Up @@ -425,8 +420,8 @@
'trailingVisual',
)
: TrailingVisual
? renderVisual(TrailingVisual, Boolean(loading) && !LeadingVisual, 'trailingVisual')
: null
? renderVisual(TrailingVisual, Boolean(loading) && !LeadingVisual, 'trailingVisual')

Check failure on line 423 in packages/react/src/Button/ButtonBase.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `··`
: null
}
</Box>
{
Expand Down
Loading