Skip to content

jlevine22/react-native-swipeable-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swipeable Element for React Native

Experimental element that can be swiped left or right to perform different actions. This is still a major work in progress.

Usage

var React = require('react-native');
var {
  View,
} = React;
var SwipeableElement = require('react-native-swipeable-element');

var MyComponent = React.createClass({
  render: function() {
    return (
      <ScrollView style={{flex: 1,}}>
        <SwipeableElement
          compnent={<Text>{'Some Text'}</Text>}
          swipeRightTitle={'Delete'}
          swipeRightTextColor={'#FFFFFF'}
          swipeRightBackgroundColor={'#000000'}
          swipeLeftTitle={'Archive'}
          swipeLeftTextColor={'#FFFFFF'}
          swipeLeftBackgroundColor={'#FF0000'}
          onSwipeRight={() => {
            // Handle swipe
          }}
          onSwipeLeft={() => {
            // Swipe left
          }} />
      </ScrollView>
    );
  }
});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published