I have a demo here
I'm using styled-components in a React app.
I wanted to structure the naming with a BEM like structure.
I'm using the examples in the article - https://tech.decisiv.com/structuring-our-styled-components-part-i-2bf21fa64b28
I also wanted to use typescript which is where I'm getting my errors
My demo works but I have errors that are the same as my actual app but there the app fails to load.
The errors are in App.tsx <Card.header>Header</Card.header>
JSX element type 'Card.header' does not have any construct or call signatures.ts(2604)
and in card.tsx Card.header = Header;
Type 'StyledComponent<"h1", any, {}, never>' is not assignable to type 'never'.ts(2322)
I have looked into these errors but can't find solution.
Does anyone know I how I might be able to fix these errors.
Card.header = Header;is this supposed to achieve..? What do you want to achieve? Some kinda inheritance pattern?