1 | # rmc-feedback
|
2 | ---
|
3 |
|
4 | :active pseudo-class with react/preact for mobile
|
5 |
|
6 | [![NPM version][npm-image]][npm-url]
|
7 | [![build status][travis-image]][travis-url]
|
8 | [![Test coverage][coveralls-image]][coveralls-url]
|
9 |
|
10 | [npm-image]: http://img.shields.io/npm/v/rmc-feedback.svg?style=flat-square
|
11 | [npm-url]: http://npmjs.org/package/rmc-feedback
|
12 | [travis-image]: https://img.shields.io/travis/react-component/m-feedback.svg?style=flat-square
|
13 | [travis-url]: https://travis-ci.org/react-component/m-feedback
|
14 | [coveralls-image]: https://img.shields.io/coveralls/react-component/m-feedback.svg?style=flat-square
|
15 | [coveralls-url]: https://coveralls.io/r/react-component/m-feedback?branch=master
|
16 |
|
17 | ## Installation
|
18 |
|
19 | `npm install --save rmc-feedback`
|
20 |
|
21 | ## Development
|
22 |
|
23 | ```
|
24 | npm install
|
25 | npm start
|
26 | ```
|
27 |
|
28 | ## Example
|
29 |
|
30 | - local: http://localhost:8000/examples/
|
31 | - online: http://react-component.github.io/m-feedback/
|
32 |
|
33 | ## Usage
|
34 |
|
35 | ```js
|
36 | import TouchFeedback from 'rmc-feedback';
|
37 |
|
38 | <TouchFeedback activeClassName="acitve" activeStyle={{ color: 'red'}} disabled={false}>
|
39 | <div>click to active</div>
|
40 | </TouchFeedback>
|
41 |
|
42 | ```
|
43 |
|
44 | ## API
|
45 |
|
46 | ### props
|
47 |
|
48 | | name | description | type | default |
|
49 | |-------------|------------------------|--------|------------|
|
50 | | disabled | | boolean | false |
|
51 | | activeClassName | className applied to child when active | string | |
|
52 | | activeStyle | style applied to child when active (set to false to disable click feedback) | object | - |
|
53 |
|
54 | ## Test Case
|
55 |
|
56 | ```
|
57 | npm test
|
58 | npm run chrome-test
|
59 | ```
|
60 |
|
61 | ## Coverage
|
62 |
|
63 | ```
|
64 | npm run coverage
|
65 | ```
|
66 |
|
67 | open coverage/ dir
|
68 |
|
69 | ## License
|
70 |
|
71 | rmc-feedback is released under the MIT license.
|