0.2.1 • Published 7 years ago
react-giphy-search v0.2.1
React Giphy Search
Add a Messenger-like Giphy search bar and gallery to your app.
Installation
yarn add react-giphy-search
Peer dependencies are react@15.x
, react-redux@5.x
, and redux@3.x
.
Usage
import React from 'react';
import ReactDOM from 'react-dom';
import GiphySearch from 'react-giphy-search';
const App = () => {
const handleGifSelection = (id) => {
console.log(id);
}
return (
<GiphySearch
onGifSelection={(id) => handleGifSelection(id)}
// optional prop `styles` to override default styles:
styles={{
wrapper: {
},
searchBar: {
},
gifList: {
},
gifListItem: {
},
}}
/>
);
}
ReactDOM.render(<App />, document.body);