Socket
Socket
Sign inDemoInstall

rc-swipeout-limited

Package Overview
Dependencies
33
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    rc-swipeout-limited

swipe out ui component for react(web and react-native) with static value of button width and disable switching when any button is visible


Version published
0
Maintainers
1
Created
Weekly downloads
 

Readme

Source

rc-swipeout


iOS-style swipeout buttons that appear from behind a component (web & react-native support)

NPM version build status Test coverage

Screenshots

rc-swipeout

Installation

npm install --save rc-swipeout

Development

web: 
npm install
npm start

rn:
tnpm run rn-start

Example

Usage

import Swipeout from 'rc-swipeout';
import 'rc-swipeout/assets/index.less';

<Swipeout
  left={[
    {
      text: 'reply',
      onPress:() => console.log('reply'),
      style: { backgroundColor: 'orange', color: 'white' }
    }
  ]}
  right={[
    {
      text: 'delete',
      onPress:() => console.log('delete'),
      style: { backgroundColor: 'red', color: 'white' }
    }
  ]}
  onOpen={() => console.log('open')}
  onClose={() => console.log('close')}
>
  <div style={{height: 44}}> swipeout demo </div>
</Swipeout>

API

props

namedescriptiontypedefault
prefixClsclassName prefixStringrc-swipeout
styleswipeout styleObject``
leftswipeout buttons on leftArray[]
rightswipeout buttons on rightArray[]
autoCloseauto close on button pressBooleanfunction() {}
onOpenFunctionfunction() {}
onCloseFunctionfunction() {}
disableddisabled swipeoutBooleanfalse

button props

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

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-swipeout is released under the MIT license.

Keywords

FAQs

Last updated on 12 Sep 2016

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc