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

IconFamilyType do not reflect accepted values defined in getIconType helper #242

Open
aayush123 opened this issue Jun 3, 2021 · 0 comments · Fixed by #244
Open

IconFamilyType do not reflect accepted values defined in getIconType helper #242

aayush123 opened this issue Jun 3, 2021 · 0 comments · Fixed by #244

Comments

@aayush123
Copy link

aayush123 commented Jun 3, 2021

Describe the bug
IconFamilyType forces Icon's family ty'pe to accept values such as 'EvilIcons', 'FontAwesome' etc, however, getIconType helper accepts values such as 'evilicons', 'font-awesome' etc, due to which, default case, ie. MaterialIcon is returned always.

To Reproduce
Steps to reproduce the behaviour:

  1. Import Icon
  2. Pass family as FontAwesome (as expected by TS declaration) and name as address-book.
  3. See error

Expected behavior
FontAwesome's address-book icon should be visible.
Instead, no icon is identified and ? is displayed.

Additional context / Proposed Solution
Either the IconFamilyType should be updated to reflect actual accepted values, or getIconType should be updated to handle new values specified by IconFamilyType.
In my opinion, IconFamilyType should be updated as it will maintain backward compatibility and fix type issue also, as the new types are anyway buggy by nature.

Willing to submit PR for same.

This was referenced Jun 3, 2021
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 a pull request may close this issue.

1 participant