react-native-easy-toast icon indicating copy to clipboard operation
react-native-easy-toast copied to clipboard

prop 'style' not defined

Open swalahamani opened this issue 3 years ago • 4 comments

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.

swalahamani avatar Mar 07 '21 03:03 swalahamani

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?

aliwaqar9811 avatar Aug 02 '21 07:08 aliwaqar9811

same here

uhmin99 avatar Oct 08 '21 07:10 uhmin99

Facing same issue too. pls...😭

yunyeop avatar Jan 12 '23 12:01 yunyeop

same

chengwb53 avatar Apr 24 '23 09:04 chengwb53