Skip to content

Use StyleX recommended pseudo-class syntax in Button - #8

Merged
cixzhang merged 6 commits into
mainfrom
button-pseudoclass-update
Jan 14, 2026
Merged

cixzhang merged 6 commits into
mainfrom
button-pseudoclass-update

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Updates Button.tsx to follow StyleX's recommended pattern for pseudo-classes, where states are nested within properties rather than as top-level keys.

Reference: https://stylexjs.com/docs/learn/styling-ui/defining-styles#pseudo-classes

Changes

  • Refactored transform, backgroundImage, outline, and outlineOffset to use nested pseudo-class syntax
  • Added documentation comment linking to StyleX docs

Test plan

  • Unit tests pass (7/7)
  • Build succeeds

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jan 14, 2026
@cixzhang
cixzhang requested a review from mellyeliu January 14, 2026 01:16
Comment thread packages/core/src/Button/Button.tsx Resolved
@cixzhang

Copy link
Copy Markdown
Contributor Author

I updated the remaining default: "none" to default: null

@cixzhang
cixzhang merged commit 1a66c92 into main Jan 14, 2026
2 checks passed
@cixzhang
cixzhang deleted the button-pseudoclass-update branch January 14, 2026 18:57
Comment thread packages/core/src/Button/Button.tsx Resolved
Comment thread packages/core/src/Button/Button.tsx Resolved
cixzhang added a commit that referenced this pull request Apr 26, 2026
* use stylex preferred pseudoclass definitions

* Update packages/core/src/Button/Button.tsx

Co-authored-by: mellyeliu <[email protected]>

* Update packages/core/src/Button/Button.tsx

Co-authored-by: mellyeliu <[email protected]>

---------

Co-authored-by: mellyeliu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants