rc-actions
v1.0.3
Published
facebook reactions in facebook react.
Downloads
1
Maintainers
Readme
rc-actions
Reactions in React.
Use facebook's reactions like tooltip to do your own actions.
Install
$ npm install --save rc-actions
Use
Array of actions.
const images = [
{id: 'like', description: 'Like', img: 'http://i.imgur.com/LwCYmcM.gif'},
{id: 'love', description: 'Love', img: 'http://i.imgur.com/k5jMsaH.gif'},
{id: 'haha', description: 'Haha', img: 'http://i.imgur.com/f93vCxM.gif'},
{id: 'yay', description: 'Yay', img: 'http://i.imgur.com/a44ke8c.gif'},
];
Your element on which reactions need to be mounted.
render() {
<button>Actions</button>
}
import and add reactions
import Reactions from 'rc-actions'
...
render () {
<Reactions items={images}>
<button>Actions</button>
</Reactions>
}
Look at the example for more details.
Develop
Build:
$ make build
Start dev server:
$ make start
Todos
- [ ] Add tests