-
Notifications
You must be signed in to change notification settings - Fork 535
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
Support passing React.ReactElements for icons #4994
Conversation
🦋 Changeset detectedLatest commit: 8a0777a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! If you have the time, it'd also be great to:
- Update stories to use the
React.ReactElement
format (this will be preferred over React.FC moving forward) - Add a test either as a type test or in Jest for the new type
…support_icon_elements
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
Hey @joshblack 👋 I added type tests, but I wasn't able to find any instances of our stories passing anything for visuals/icons other than |
Closes https://github.com/github/primer/issues/3907
We accept
React.FunctionComponent
for a number of icon slots, but not a regular 'olReact.ReactElement
. This PR updates several components to accept both, which should make Figma happier.Changelog
New
Changed
Updated the following components to accept a
React.ReactElement
for icon slots:AutocompleteMenuItem
AutocompleteMenu
SegmentedControlButton
SegmentedControlIconButton
Removed
Rollout strategy
Testing & Reviewing
This PR should not require any updates in production, as it is purely additive.
Merge checklist