Package Exports
- rc-touchable
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rc-touchable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rc-touchable
react touchable component. inspired by react-native.
Install
Usage
import Touchable from 'rc-touchable';
ReactDOM.render(<Touchable onPress={onPress} activeClassName="active">
<div>click</div>
</Touchable>, container);API
| name | type | default | description |
|---|---|---|---|
| disabled | boolean | false | |
| onPress | ()=>void | onPress/onTap callback | |
| onLongPress | ()=>void | onLongPress/onLongTap callback | |
| activeClassName | string | className applied to child when active | |
| activeStyle | object | style applied to child when active | |
| activeStopPropagation | object | stop child active propagate to parent |
Development
npm install
npm startExample
http://localhost:8007/examples/
online example: http://react-component.github.io/touchable/
Test Case
npm test
npm run chrome-testCoverage
npm run coverageopen coverage/ dir
License
rc-touchable is released under the MIT license.
