octicons and react components not working
April 7, 2020 at 5:37pmocticons and react components not working
April 7, 2020 at 5:37pm (Edited 2 years ago)I cant seem to get the Octicons working with the
icon
prop of the react components. When I try to use them it says:Type 'Icon<14, 16>' is not assignable to type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)> | undefined'.Type 'FunctionComponent<{}> & { size: [14, 16]; }' is missing the following properties from type 'ReactElement<any, string | ((props: any) => ReactElement<any, string | ... | (new (props: any) => Component<any, any, any>)> | null) | (new (props: any) => Component<any, any, any>)>': type, props, key TS2322
Gotta love typescript errors.
I've tried using the icon components directly like
<TextInput icon={Play} />
but I've also tried <TextInput icon={
iconsByName.play
} />
as well as all the other ways to use the icons described in the docs.Is this the right place or is there a better place to ask? Slack or Discord or something..