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

fix(Icon): improve icon type definition by making it a descriminated union on name and data #3547

Merged

Conversation

FredrikMWold
Copy link
Contributor

This pull request improves the type defintion of the Icon component by making it a discrimited union on the props name and data. This makes it so that you have to supplie either as if you the Icon ends up crashing and throwing an error

Copy link
Collaborator

@oddvernes oddvernes left a comment

Choose a reason for hiding this comment

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

LGTM!

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.

2 participants