react-native-pin-view icon indicating copy to clipboard operation
react-native-pin-view copied to clipboard

TS errors for customLeftButton and customRightButton

Open rishabmahesh opened this issue 1 year ago • 2 comments

Describe the bug I am getting TS errors for the customLeftButton and customRightButton. The error is: -

Type 'Element | undefined' is not assignable to type 'FunctionComponent<any> | undefined'.
  Type 'Element' is not assignable to type 'FunctionComponent<any>'.

react-native-pin-view.d.ts(48, 9): The expected type comes from property 'customRightButton' which is declared here on type 'IntrinsicAttributes & PinViewProps'

To Reproduce

  1. Copy paste demo code

Expected behavior While the buttons are working as expected, it would be great to have everything typesafe

Screenshots image

Device (please complete the following information):

  • Device: [e.g. iPhone6] Pixel 5
  • OS: [e.g. iOS8.1] Android
  • Version [e.g. 22] 12

rishabmahesh avatar Aug 24 '23 02:08 rishabmahesh