New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rn-swipeable

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-swipeable

Completely customizable swipeable component for react native. Supports both iOS and Android. Wrapped around react-native-swipe-out.

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

rn-swipeable

Completely customizable swipeable component for react native. Supports both iOS and Android. Wrapped around react-native-swipe-out.

NPM version

Installation

npm install --save rn-swipeable

Usage

import Swipeable from 'rn-swipeable/lib';

<Swipeable
  left={[
    {
      text: 'reply',
      onPress:() => console.log('reply'),
      style: { backgroundColor: 'orange', color: 'white' },
      renderChildren: () => <View><Text> This is inside left children </Text></View>
    }
  ]}
  right={[
    {
      text: 'delete',
      onPress:() => console.log('delete'),
      style: { backgroundColor: 'red', color: 'white' },
      renderChildren: () => <View><Text> This is inside right children </Text></View>
    }
  ]}
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
>
  <View style={{flex: 1, justifyContent: 'center'}}> This is inside the swipeable component </View>
</Swipeable>

API

props

namedescriptiontypedefault
styleswipeable styleObject``
leftswipeable buttons on leftArray[]
rightswipeable buttons on rightArray[]
autoCloseauto close on button pressBooleanfunction() {}
onOpenFunctionfunction() {}
onCloseFunctionfunction() {}
disableddisabled swipeableBooleanfalse

button props

namedescriptiontypedefault
textbutton textStringClick
stylebutton styleObject``
onPressbutton press functionFunctionfunction() {}

License

rn-swipeable is released under the MIT license.

Keywords

react

FAQs

Package last updated on 26 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts