I'm using in my project library react-icons
to provide some standard icons (mostly Material Design ones).
Sometimes I need to pass an icon to a compoment and then override some properties, for instance (pseudocode):
type MyComponentProps = {
icon: (?)
}
function MyComponent({ icon } : MyComponentProps) {
return (
<icon size={20} className="inline-block" />
)
}
Is it possible? How should I declare the props type to make it possible?