@janiscommerce/ui-native
Version:
components library for Janis app
12 lines (11 loc) • 551 B
JavaScript
import React from 'react';
import BottomSheet from '@gorhom/bottom-sheet';
const SwipeUp = React.forwardRef(({ children, snapPoints = ['100%'], snapPosition = 0, style, onChangeSnap, backgroundStyle, swipeWrapperStyle, ...props }, ref) => {
if (!children) {
return null;
}
return (<BottomSheet ref={ref} snapPoints={snapPoints} index={snapPosition} onChange={onChangeSnap} style={style} containerStyle={backgroundStyle} backgroundStyle={swipeWrapperStyle} {...props}>
{children}
</BottomSheet>);
});
export default SwipeUp;