3.1.5 • Published 8 years ago

@maintained-repos/react-native-swipeout v3.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

Brought to you by Maintained Repos

NPM version

Original repo found at https://github.com/dancormier/react-native-swipeout. This fork is brought to you by @maintained-repos.

react-native-swipeout

iOS-style swipeout buttons that appear from behind a component

swipeout preview

Installation

npm install --save @maintained-repos/react-native-swipeout

Usage example

See example/index.ios.js for a more detailed example. See the Wiki usage tips. To use swipeout behind a iOS-style listitem, try react-native-listitem.

var Swipeout = require('react-native-swipeout')

// Buttons
var swipeoutBtns = [
  {
    text: 'Button'
  }
]

// Swipeout component
<Swipeout right={swipeoutBtns}>
  <View>
    <Text>Swipe me left</Text>
  </View>
</Swipeout>

Props

PropTypeOptionalDefaultDescription
autoCloseboolYesfalseauto close on button press
backgroundColorstringYes'#dbddde'
closeboolYesclose swipeout
leftarrayYes[]swipeout buttons on left
onOpenfuncYes
rightarrayYes[]swipeout buttons on right
scrollfuncYesprevent parent scroll
stylestyleYesstyle of the container
sensitivitynumberYes0change the sensitivity of gesture
Button props
PropTypeOptionalDefaultDescription
backgroundColorstringYes'#b6bec0'background color
colorstringYes'#ffffff'text color
componentstringYesnullpass custom component to button
onPressfuncYesnullfunction executed onPress
textstringYes'Click Me'text
typestringYes'default'default, primary, secondary
underlayColorstringYesnullbutton underlay color on press
disabledboolYesfalsedisable button

To Do

https://github.com/dancormier/react-native-swipeout/issues