Skip to content

Commit

Permalink
docs: updated example use
Browse files Browse the repository at this point in the history
  • Loading branch information
dylandbl authored Jul 27, 2022
1 parent ffd5bd9 commit 5ba35ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@ yarn add react-quick-reactions

## Example use
```TSX
import { useState } from 'react';
import { useState } from "react";
import QuickReactions from "react-quick-reactions";

const App = () => {
const [isVisible, setIsVisible] = useState(false);

return (
<div className="App">
<QuickReactions
onClickEmoji={(e) => {
window.alert(e?.textContent);
onClickEmoji={(emoji) => {
window.alert(emoji.content);
}}
isVisible={isVisible}
onClose={() => setIsVisible(false)}
Expand All @@ -42,7 +43,7 @@ const App = () => {
}
]}
trigger={
<button
<button
onClick={() => {
setIsVisible(true);
}}
Expand Down

0 comments on commit 5ba35ca

Please sign in to comment.