I use https://gorhom.github.io/react-native-bottom-sheet/ with typescript in my project and I also use CustomBackground for my bottom-sheet :
interface ICustomBackgroundProps { bottomSheetindex: number}const CustomBackground = ({ animatedIndex, style, bottomSheetIndex}: BottomSheetBackgroundProps & ICustomBackgroundProps): JSX.Element => { // animated variables const animatedBackground = useMemo( () => interpolateColors(animatedIndex, { inputRange: [0, 1], outputColorRange: ['#fff', '#fff'], }), [animatedIndex], ); // styles const containerStyle = useMemo( () => [style, animatedIndex], [style, animatedBackground], ); return (<Animated.View style={{ ...containerStyle, flex: 1 }}><View style={{ position: 'absolute', left: '50%', top: -20, zIndex: 555555 }}><CustomHandle bottomSheetIndex={bottomSheetIndex} /></View><Image source={images.BaseShape} style={{ width: WIDTH_SHAPE, position: 'absolute', top: normalize(-77, 'height'), resizeMode: 'cover', alignSelf: 'center', }} /></Animated.View> );};
I need to pass a custom props (bottomSheetIndex in my code) but when I want to pass. it, I have an error : Property 'bottomSheetIndex' does not exist on type 'BottomSheetBackgroundProps & ICustomBackgroundProps'
How can I pass resolve this?