how not working? please, help) Example with icon.
maybe use FC, or clasess extends
const MyIcon = (props: { icon: string }) => {
return <span/>;
};
const OtherComponent = (props: { text: string }) => {
return <span/>;
};
const SomeComponent = (props: { content: React.ReactElement<typeof MyIcon>}) => {
return <div/>;
};
const result1 = <SomeComponent content={<MyIcon icon='Plus'/>} />;
const result2 = <SomeComponent content={<OtherComponent text='text'/>} />; // wait error