Skip to content

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

Merged
joshblack merged 6 commits into
mainfrom
feat/add-support-for-element-icons
Jul 9, 2024
Merged

feat(UnderlineNavItem): add support for icons as React.ReactElement#4718
joshblack merged 6 commits into
mainfrom
feat/add-support-for-element-icons

Conversation

@joshblack

Copy link
Copy Markdown
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 ownerJuly 3, 2024 14:40
@joshblack
joshblack requested a review from keithamusJuly 3, 2024 14:40
@changeset-bot

changeset-botBot commented Jul 3, 2024

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactMinor

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

github-actionsBot commented Jul 3, 2024

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js91.2 KB (-0.07% 🔽)
packages/react/dist/browser.umd.js91.5 KB (-0.01% 🔽)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-4718 July 3, 2024 14:44 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-4718 July 3, 2024 15:06 Inactive

@broccolinisoupbroccolinisoup left a comment

Copy link
Copy Markdown
Member

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-actionsBottemporarily deployed to storybook-preview-4718 July 4, 2024 13:54 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-4718 July 9, 2024 15:23 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-4718 July 9, 2024 15:36 Inactive
@joshblack
joshblack added this pull request to the merge queueJul 9, 2024
Merged via the queue into main with commit fd80a60Jul 9, 2024
@joshblack
joshblack deleted the feat/add-support-for-element-icons branch July 9, 2024 15:56
@primerprimerBot mentioned this pull request Jul 9, 2024
Sign up for freeto 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

@joshblack@keithamus@broccolinisoup