We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's a basic example which shows the issue: https://codesandbox.io/s/nifty-river-olt52e?file=/src/App.tsx
When we add a styles prop to a Breakpoint we get a Typescript error:
No overload matches this call. Overload 1 of 2, '(props: Props | Readonly<Props>): Breakpoint', gave the following error. Type '{ children: string; style: { background: string; }; sm: true; down: true; }' is not assignable to type 'Readonly<Props>'. Property 'style' is incompatible with index signature. Type '{ background: string; }' is not assignable to type 'ReactNode'. Property 'background' does not exist on type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'. Overload 2 of 2, '(props: Props, context: any): Breakpoint', gave the following error. Type '{ children: string; style: { background: string; }; sm: true; down: true; }' is not assignable to type 'Readonly<Props>'. Property 'style' is incompatible with index signature. Type '{ background: string; }' is not assignable to type 'ReactNode'. Property 'background' does not exist on type 'ReactElement<any, string | JSXElementConstructor<any>> | ReactFragment | ReactPortal'.ts(2769)
Essentially the problem is the [key: string]: React.ReactNode | string | boolean; on ReactSocks.Props
[key: string]: React.ReactNode | string | boolean;
ReactSocks.Props
One way to fix it is to change it to this:
[key: string]: React.ReactNode | React.CSSProperties | string | boolean;
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Here's a basic example which shows the issue: https://codesandbox.io/s/nifty-river-olt52e?file=/src/App.tsx
When we add a styles prop to a Breakpoint we get a Typescript error:
Essentially the problem is the
[key: string]: React.ReactNode | string | boolean;
onReactSocks.Props
One way to fix it is to change it to this:
[key: string]: React.ReactNode | React.CSSProperties | string | boolean;
The text was updated successfully, but these errors were encountered: