Styled components in a hoc react component
问题 I am having two issues with using styled components in a hoc wrapper in react. The component is rendered, but not with the background color. The ComponentWithAddedColors is not valid typescript. Don't know why. Anyone who can help with this? interface IProps { id: string; left: number; top: number; } export const Node: React.FC<IProps> = ({ id, left, top }) => { return ( <Container left={left} top={top}> {id} </Container> ); }; function withColors<T>(Component: React.ComponentType<T>) { const