Skip to content

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Sep 6, 2023

This PR adds support for leadingVisual and trailingVisual for the upcoming v36 release where we move to these names by default. In v36, leadingIcon and trailingIcon will be removed.

Changelog

New

Changed

  • Update Button types to include leadingVisual and trailingVisual
  • Update ButtonBase to prefer leadingVisual and trailingVisual to their icon counterparts
  • Update tests to include cases for leadingVisual, leadingIcon, trailingVisual, trailingIcon

Removed

@joshblack joshblack requested review from a team and broccolinisoup September 6, 2023 22:01
@changeset-bot
Copy link

changeset-bot bot commented Sep 6, 2023

🦋 Changeset detected

Latest commit: 8ff5f41

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 100.69 KB (+0.07% 🔺)
dist/browser.umd.js 101.27 KB (+0.09% 🔺)

Copy link
Member

@broccolinisoup broccolinisoup left a comment

Choose a reason for hiding this comment

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

Looking fantastic! 🥳

expect(screen.getByTestId('leadingIcon')).toBeInTheDocument()

const position = screen.getByText('content').compareDocumentPosition(screen.getByTestId('leadingIcon'))
expect(position).toBe(Node.DOCUMENT_POSITION_PRECEDING)
Copy link
Member

Choose a reason for hiding this comment

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

so cool 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants