1.0.2 • Published 7 years ago
rmc-swipe-item v1.0.2
rmc-swipe-item
React Mobile Carousel Component (web and react-native)
Screenshots
Usage
npm install rmc-swipe-itemimport SwipeItem from 'rmc-swipe-item';
const btnList = [
{
text: 'edit',
style: {
backgroundColor: 'red',
},
onClick: this.editClick,
},
{
text: 'cancel',
style: {},
onClick: () => {},
},
]
<SwipeItem btnList={ btnList }>
<div style={{ lineHeight: '30px', paddingLeft: '40px', border: '1px solid #eee' }}>
<div>
<a target='_blank' href='http://www.baidu.com' rel="noopener noreferrer">Hansin Test</a>
</div>
<a target='_blank' href='http://www.baidu.com' rel="noopener noreferrer">---Test</a>
</div>
</SwipeItem>Development
npm i
npm startExample
http://localhost:8000/examples/
install
API
Carousel props
| name | description | type | default |
|---|---|---|---|
| btnList | button list | Array | isRequired |
| style | swipe style | Object | {} |
| className | className | String | '' |
Test Case
npm test
npm run chrome-testCoverage
npm run coverageopen coverage/ dir
License
rmc-swipe-item is released under the MIT license.