ionicons icon indicating copy to clipboard operation
ionicons copied to clipboard

feat: add types for icon names

Open mikaelkaron opened this issue 9 months ago • 1 comments

Describe Problem

it should be possible to type the name and icon props with available icon names

Describe Preferred Solution

name could be typed as:

type IconNames = 'accessibility' | 'accessibility-outline' | 'accessibility-sharp'...

icon could be typed as:

type IconSource = IconNames | (string & {})

You can find an explanation for the string & {} part on google

Describe Alternatives

No response

Additional Information

No response

mikaelkaron avatar Aug 30 '23 09:08 mikaelkaron

Thank you for the request. I agree that this would be a valuable addition to Ionicons 👍 We may be able to auto-generate the type using the existing generated metadata.

amandaejohnston avatar Aug 30 '23 14:08 amandaejohnston