Skip to content
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

prop 'style' not defined #100

Open
swalahamani opened this issue Mar 7, 2021 · 4 comments
Open

prop 'style' not defined #100

swalahamani opened this issue Mar 7, 2021 · 4 comments

Comments

@swalahamani
Copy link

Getting the property 'style' not defined error while using in TypeScript:

(JSX attribute) style: { backgroundColor: string; } No overload matches this call. Overload 1 of 2, '(props: ToastComponentProps | Readonly<ToastComponentProps>): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Overload 2 of 2, '(props: ToastComponentProps, context: any): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'.ts(2769)

Found one pull request #97 with the fix for the same, but seems like not merged yet.

@aliwaqar9811
Copy link

I'm facing this same issue as well. Any idea when this

Getting the property 'style' not defined error while using in TypeScript:

(JSX attribute) style: { backgroundColor: string; } No overload matches this call. Overload 1 of 2, '(props: ToastComponentProps | Readonly<ToastComponentProps>): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Overload 2 of 2, '(props: ToastComponentProps, context: any): Toast', gave the following error. Type '{ ref: (toast: Toast | null) => void; style: { backgroundColor: string; }; position: "bottom"; positionValue: number; fadeInDuration: number; fadeOutDuration: number; opacity: number; textStyle: { ...; }; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'. Property 'style' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<Toast> & Readonly<ToastComponentProps> & Readonly<...>'.ts(2769)

Found one pull request #97 with the fix for the same, but seems like not merged yet.

Facing same issue. Any idea when will this get merged?

@uhmin99
Copy link

uhmin99 commented Oct 8, 2021

same here

@yunyeop
Copy link

yunyeop commented Jan 12, 2023

Facing same issue too. pls...😭

@chengwb53
Copy link

same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants