Skip to content

Commit

Permalink
With Reactions Pre-Release
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jan 22, 2024
1 parent e58e772 commit 2b06a31
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@vercel/analytics": "^1.1.1",
"emoji-picker-react": "^4.6.15",
"emoji-picker-react": "^4.7.16-rc.0",
"next": "13.5.6",
"react": "^18",
"react-dom": "^18"
Expand Down
24 changes: 24 additions & 0 deletions src/components/PickerControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export function PickerControls({
updateState("customEmojis", customEmojis)
}
/>
<ChkReactions
reactionsDefaultOpen={pickerProps.reactionsDefaultOpen}
setReactionsDefaultOpen={(reactionsDefaultOpen) =>
updateState("reactionsDefaultOpen", reactionsDefaultOpen)
}
/>
<div className={styles.spacer} />
<button onClick={reset} className={styles.ButtonReset}>
Reset
Expand Down Expand Up @@ -303,3 +309,21 @@ function SelectSkinTonePickerLocation({
</Label>
);
}

function ChkReactions({
reactionsDefaultOpen,
setReactionsDefaultOpen,
}: {
reactionsDefaultOpen?: boolean;
setReactionsDefaultOpen: (reactionsDefaultOpen: boolean) => void;
}) {
return (
<Label text="Reactions">
<input
type="checkbox"
checked={reactionsDefaultOpen}
onChange={(e) => setReactionsDefaultOpen(e.target.checked)}
/>
</Label>
);
}

0 comments on commit 2b06a31

Please sign in to comment.