UNPKG

@janiscommerce/ui-native

Version:
12 lines (11 loc) 551 B
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;