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

Material theme icons produce propTypes warnings #1472

Closed
MindFreeze opened this issue Mar 17, 2017 · 2 comments
Closed

Material theme icons produce propTypes warnings #1472

MindFreeze opened this issue Mar 17, 2017 · 2 comments
Labels

Comments

@MindFreeze
Copy link
Contributor

Steps

  1. Use material theme for icons
  2. Add an icon with name="apps" (or notifications or others)

Expected Result

This should just render the material icon.

Actual Result

Icons are rendered but console warnings are produced:

Failed prop type: Invalid prop `name` of value `apps` supplied to `Icon`.

Version

0.67.0

Maybe material icon names should be added ICON_ALIASES in https://github.com/Semantic-Org/Semantic-UI-React/blob/master/src/lib/SUI.js . Or maybe just disable validation of the name as you can't possibly cover all themes including any custom icons ppl may add. Possibly add another prop that would disable this validation?

@layershifter
Copy link
Member

Maybe material icon names should be added

Nope. We use only defined icon names from SUI.

Possibly add another prop that would disable this validation?

Use className prop to add your custom classes:

<Icon className="apps" />

@levithomason
Copy link
Member

You can find more info on customizing icons here #931 (comment).

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

No branches or pull requests

3 participants