Show error when an unknown icon name is passed to icon component
Description
Activity
Show:
Details
Details
Assignee

Reporter

Labels
Tested Version/s
None
Components
Priority

More fields
Time tracking
More fields
Time trackingCreated 21 June 2017 at 00:31
Updated 10 July 2017 at 03:23
We have had a few bugs because of non-existent icon names being passed to the <Icon> component. This change aims to avoid that type of bug in the future.
We should update the component to generate an error as early as possible when an unknown icon name is used. Transpile-time is preferred, but this will likely be a browser console error.
Technical note
This can be done with propTypes validation if we inject the icon list into the appropriate place. There are scripts generating the icon list so we can probably extend one of those to add the list to proptypes validation.