2.0.11 • Published 6 years ago

rc-swipeout v2.0.11

Weekly downloads
25,461
License
-
Repository
github
Last release
6 years ago

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

react-native

./node_modules/rc-tools run react-native-init
react-native run-ios

Usage

import Swipeout from 'rc-swipeout';
import 'rc-swipeout/assets/index.less'; (web only)

<Swipeout
  left={[
    {
      text: 'reply',
      onPress:() => console.log('reply'),
      style: { backgroundColor: 'orange', color: 'white' },
      className: 'custom-class-1'
    }
  ]}
  right={[
    {
      text: 'delete',
      onPress:() => console.log('delete'),
      style: { backgroundColor: 'red', color: 'white' },
      className: 'custom-class-2'
    }
  ]}
  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() {}
classNamebutton custom classString

Test Case

npm test
npm run chrome-test

Coverage

npm run coverage

open coverage/ dir

License

rc-swipeout is released under the MIT license.

2.0.11

6 years ago

2.0.10

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

7 years ago

1.4.7

7 years ago

2.0.0

7 years ago

2.0.0-alpha.2

7 years ago

2.0.0-alpha.1

7 years ago

1.4.6

7 years ago

2.0.0-alpha.0

7 years ago

1.4.6-alpha.7

7 years ago

1.4.6-alpha.6

7 years ago

1.4.6-alpha.5

7 years ago

1.4.6-alpha.4

7 years ago

1.4.6-alpha.3

7 years ago

1.4.6-alpha.2

7 years ago

1.4.5

7 years ago

1.4.5-alpha.0

7 years ago

1.4.4

7 years ago

1.4.3

7 years ago

1.4.2

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago