Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-swipeout

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-swipeout

swipe out ui component for react

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
increased by4.02%
Maintainers
1
Weekly downloads
 
Created
Source

rc-swipeout


iOS-style swipeout buttons that appear from behind a component

NPM version build status

Screenshots

swipeout

Installation

npm install --save rc-swipeout

Development

npm install
npm start

Example

Usage

import Swipeout from 'rc-swipeout';

<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

属性说明类型默认值
prefixClsclassName prefixStringrc-swipeout
styleswipeout styleObject``
leftswipeout buttons on leftArraynull
rightswipeout buttons on rightArraynull
autoCloseauto close on button pressBooleanfunction() {}
onOpenFunctionfunction() {}
onCloseFunctionfunction() {}
disableddisabled swipeoutBooleanfalse

button props

属性说明类型默认值
textbutton textStringClick
stylebutton styleObject``
onPressbutton press functionFunctionfunction() {}

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

react-swipeout is released under the MIT license.

Keywords

FAQs

Package last updated on 16 Jun 2016

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc