Show error when an unknown icon name is passed to icon component

Description

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.

Status

Assignee

David Mason

Reporter

David Mason

Tested Version/s

None

Components

Priority

unspecified
Configure