Swipe element left or right for an action.
Use
<SwipeX leftAllowed={true} background={<DraggableBg/>} eventCallback={restaurantCallback} threshold={10} eventThreshold={0.25}> </SwipeX>
Threshold is a pixel value, event threshold is a decimal representing a percent of the element's width. Both have defaults.
leftAllowed represents the direction of swipe allowed. Passing rightAllowed={true} for only right swiping. If neither is passed in then moving from both directions will be allowed.