I noticed a few minor things with the .attrs examples in the docs.
First, fixed a tiny syntax error in the example here that caused an error to show up in the page:
Next, the generic type parameters seem to be in the wrong position, as the examples all give me type errors when I copy them (SC 6.0.2 & TS 5.1.6):
I could easily be wrong here as I was actually looking at the docs for examples of correct generics with .attrs 😅, but moving the param seems to resolve the error and the props still get typed properly when using the attr-wrapped component.
I noticed a few minor things with the
.attrs
examples in the docs.First, fixed a tiny syntax error in the example here that caused an error to show up in the page:![image](https://github.com/styled-components/styled-components-website/assets/30258875/1a132373-e5dd-48e6-bd02-944370f93493)
Next, the generic type parameters seem to be in the wrong position, as the examples all give me type errors when I copy them (SC 6.0.2 & TS 5.1.6):
I could easily be wrong here as I was actually looking at the docs for examples of correct generics with
.attrs
😅, but moving the param seems to resolve the error and the props still get typed properly when using the attr-wrapped component.