0.0.3 • Published 5 years ago

react-native-swipeable-up-down v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React Native Swipeable Up Down

Installation

yarn add react-native-swipeable-up-down

Note: Progress indicators has been broken out to a separate component; react-native-interactable. To use them, please follow installation instructions for that package.

Usage

import SwipeableUpDown from 'react-native-swipeable-up-down';

<SwipeableUpDown
	isList
	childrenRef={this.refs.flatListRef}
	ref='swipeableBoxRef'
>
	<FlatList
		ref='flatListRef'
		data={[{key: 'a'}, {key: 'b'}]}
		renderItem={({item}) => <Text>{item.key}</Text>}
	/>
</SwipeableBox>

Properties

PropDescriptionDefault
snapPointsRelated RN Interactable .true
boundariesRelated RN Interactable.true
initialPositionRelated RN Interactable.true
isListTo handle scrollview in List, so if you're using List (FlatList, ScrollView,...) should set value is true.false
childrenRefIf you're using list in SwipeableBox, you need pass your Reference of List.None
onStateChangeIt's call when box show or hide.true

Methods

this.refs.swipeableBoxRef.show()

this.refs.swipeableBoxRef.hide()

this.refs.swipeableBoxRef.isVisble()

License

This module is MIT licensed