react-giphy-search
v0.2.1
Published
A React component for searching GIFs on GIPHY.
Downloads
97
Readme
React Giphy Search
Add a Messenger-like Giphy search bar and gallery to your app.
Installation
yarn add react-giphy-search
Peer dependencies are [email protected]
, [email protected]
, and [email protected]
.
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);