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

Carbon React TooltipIcon component should accept a renderIcon prop #8608

Closed
John30013 opened this issue May 7, 2021 · 0 comments · Fixed by #8612
Closed

Carbon React TooltipIcon component should accept a renderIcon prop #8608

John30013 opened this issue May 7, 2021 · 0 comments · Fixed by #8612

Comments

@John30013
Copy link

Summary

The current TooltipIcon implementation requires including the icon as a child element. Most other Carbon React components that include an icon do so via the renderIcon prop. I'm requesting that you update TooltipIcon to follow this pattern, and allow specifying the icon via a renderIcon prop.

Justification

This change would provide a programming interface that is consistent with other Carbon React components that display an icon (Button, Link, OverflowMenu, and Tag).

Desired UX and success metrics

Developers would be able to use a consistent programming interface to specify the icon to be rendered by any Carbon React component that can render an icon.

"Must have" functionality

N/A

Specific timeline issues / requests

N/A

Available extra resources

I'm sure I could implement this myself, but it would take some time as I would need to study other Carbon React components that implement the renderIcon prop to see how it's done. It would probably be faster for someone on the Carbon React development team to do this. But I'll be glad to give it a shot.

Carbon is a collaborative system. We encourage teams to build components and
submit them for integration as either add-ons or core components.

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

Successfully merging a pull request may close this issue.

2 participants