ionicons
ionicons copied to clipboard
feat: add types for icon names
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
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.