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

feat(UnderlineNavItem): add support for icons as React.ReactElement #4718

Merged
merged 6 commits into from
Jul 9, 2024

Conversation

joshblack
Copy link
Member

Update the icon prop in UnderlineNavItem to also support React.ReactElement in addition to React.FC.

This change will help us with Figma Code Connect files and also opens up the opportunity for the icon prop to be static as an element which can help with performance.

Changelog

New

  • Add support for React.ReactElement to the icon prop for UnderlineNavItem

Changed

Removed

Rollout strategy

  • Minor release

Testing & Reviewing

  • Verify that this functionality has been covered in a test case
  • Verify that the icon still renders as expected in either branch

@joshblack joshblack requested a review from a team as a code owner July 3, 2024 14:40
@joshblack joshblack requested a review from keithamus July 3, 2024 14:40
Copy link

changeset-bot bot commented Jul 3, 2024

🦋 Changeset detected

Latest commit: 83ad76b

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

@joshblack joshblack requested a review from broccolinisoup July 3, 2024 14:41
Copy link
Contributor

github-actions bot commented Jul 3, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 91.2 KB (-0.07% 🔽)
packages/react/dist/browser.umd.js 91.5 KB (-0.01% 🔽)

@github-actions github-actions bot temporarily deployed to storybook-preview-4718 July 3, 2024 14:44 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-4718 July 3, 2024 15:06 Inactive
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.

Looks great 🎉 Thanks!!

@joshblack joshblack enabled auto-merge July 4, 2024 13:50
@github-actions github-actions bot temporarily deployed to storybook-preview-4718 July 4, 2024 13:54 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-4718 July 9, 2024 15:23 Inactive
@joshblack joshblack added this pull request to the merge queue Jul 9, 2024
Merged via the queue into main with commit fd80a60 Jul 9, 2024
30 checks passed
@joshblack joshblack deleted the feat/add-support-for-element-icons branch July 9, 2024 15:56
@primer primer bot mentioned this pull request Jul 9, 2024
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