-
-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style
prop type error
#269
Comments
Why would you like to use |
I don't want to use it but when I pass textarea props to my wrapping components I get errors. Shouldn't then the better solution be to omit |
If I use the
With |
Could you prepare a repro case on which I could take a loot at? |
https://codesandbox.io/s/react-typescript-playground-ebgce?file=/src/index.tsx Here are all three examples of just making a wrapper component that passes it's props down to |
Just a note - I've recognized a problem on CodeSandbox using your provided repro codesandbox/codesandbox-client#4307 I've also checked that those 2 are not the same: type Ref1 = React.ComponentProps<typeof TextareaAutosize>["ref"]
type Ref2 = TextareaAutosizeProps["ref"] I guess I need to export |
Actually - I have gone in a slightly different direction. You can take a look at db872f0 . I will probably release this over the weekend. |
I'm not exactly sure why |
I don't think this is a problem. The problem is that I've declared our props to use But as |
Can't you then just use the |
Yes, I can. Thanks for the tip - this is even better. It seems that I have been using I've just prepared a change for this: 61ca826 |
If I just try to pass text area attributes (from
React.InputHTMLAttributes
) toTextareaAutosize
there is a type error thatheight
property ofstyle
does not match.Here is the full error:
I don't feel like I should be getting an error there.
The text was updated successfully, but these errors were encountered: