Closed justinwaite closed 2 years ago
I would recommend updating the component generator to do the following for props:
export type ${componentName}Props = React.ComponentPropsWithoutRef<'svg'> & {
or something similar
@justinwaite thank you very much for the contribution, merge your pull request
Hello!
Since the upgrade to version 5, I am unable to specify a
className
prop on the icons. Although it still technically works, it does cause a typescript error.Example:
There are a few ways that this could be handled. Either you could extend the SVG props as defined by React, or create a shared interface that all of the icons extend (if you want more control over what props users should pass through).
I'm happy to assist in any way, just let me know what course of action you prefer to take.