Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibraabukaff/react-vibes
React JS - Add Reactions To Your Content or WebPages
https://github.com/ibraabukaff/react-vibes
amused angry emoticon emotion happy inlove react reactions reactjs sad shocked vibes
Last synced: 4 days ago
JSON representation
React JS - Add Reactions To Your Content or WebPages
- Host: GitHub
- URL: https://github.com/ibraabukaff/react-vibes
- Owner: ibraAbuKaff
- License: mit
- Created: 2018-05-27T09:41:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-27T09:45:34.000Z (over 6 years ago)
- Last Synced: 2024-12-18T06:23:35.263Z (16 days ago)
- Topics: amused, angry, emoticon, emotion, happy, inlove, react, reactions, reactjs, sad, shocked, vibes
- Language: JavaScript
- Size: 132 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-vibes
React JS - Add Reactions To Your Content or WebPagesHow to install ?
yarn add react-vibesExample:
![https://imgur.com/a/lXdyFpR](./example-pics/ss1.png)
How to use it ?
```
import React, {Component} from "react";
import {ReactVibes} from "react-vibes";class App extends Component {
constructor() {
super();
this.onClickEmoji = this.onClickEmoji.bind(this);
}onClickEmoji = (e) => {
console.log(e.emoji);
console.log(e.counter);
};render() {
return (
);
}
}export default App;
```
Available Options
===================================
You can init the counters by passing props as the following:
```
```
===================================
You can show all emojies except some specific ones; for example we don't want to show `amused, and happy` :
```
```
===================================
There also an event (onClick), using it you can access the current clicked emoji, and the current counter for it:
```
onClickEmoji = (e) => {
console.log(e.emoji);
console.log(e.counter);
};
```