🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Use facebook’s reactions like tooltip to do your own actions.

Others React

Documentation

rc-actions npm

Reactions in React.

Use facebook's reactions like tooltip to do your own actions.

Install

$ npm install --save rc-actions 

Use

Demo from the example folder.

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

  • Tidy code
  • Add tests

imcrc.me  ·  GitHub @crc442  · 


You May Also Like