Skip to content

Add typescript typings for Icon names. #1475

@nandorojo

Description

@nandorojo

Describe the feature

Big fan of this awesome library. This is a small suggestion.

If you give an icon an invalid name, you get an error telling you all of the available icon names:

<Button icon="some-inexistent-name"></Button>

// Invalid prop `name` of value `some-inexistent-name` supplied to `Icon`

Screen Shot 2019-11-14 at 9 19 30 PM

It would be useful if the icon prop had Typescript suggestions with the available names.

Also, in the error message, it would be useful to add a link to a website that has the available icon names.

Motivation

It's hard to know which icon types are usable while coding. Also, the error message is long, so it slows the logs down a little.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions