1.0.3 • Published 8 years ago

rc-actions v1.0.3

Weekly downloads
9
License
MIT
Repository
github
Last release
8 years ago

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

  • Add tests

npm.io

imcrc.me  ·  GitHub @crc442  · 

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago