nysamnang / react-native-raw-bottom-sheet

Add Your Own Component To Bottom Sheet Whatever You Want (Android and iOS)
https://npmjs.com/package/react-native-raw-bottom-sheet
MIT License
1.09k stars 195 forks source link

fixed ts error #162

Closed kozakstar closed 8 months ago

kozakstar commented 1 year ago

Simple solution to fix this ts error TS2769: No overload matches this call.   Overload 1 of 2, '(props: RBSheetProps | Readonly): RBSheet', gave the following error.     Type '{ children: Element; ref: ForwardedRef; height: number; closeOnDragDown: true; closeOnPressMask: true; customStyles: { container: { borderTopLeftRadius: number; borderTopRightRadius: number; paddingHorizontal: string; }; draggableIcon: { ...; }; }; keyboardAvoidingViewEnabled: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.       Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.   Overload 2 of 2, '(props: RBSheetProps, context: any): RBSheet', gave the following error.     Type '{ children: Element; ref: ForwardedRef; height: number; closeOnDragDown: true; closeOnPressMask: true; customStyles: { container: { borderTopLeftRadius: number; borderTopRightRadius: number; paddingHorizontal: string; }; draggableIcon: { ...; }; }; keyboardAvoidingViewEnabled: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'.       Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly'

kozakstar commented 1 year ago
image

small fix this ts error

stereodenis commented 1 year ago

better use PropsWithChildren

nysamnang commented 8 months ago

Merged #146