Skip to content

Commit

Permalink
Fix Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Jan 26, 2024
1 parent ed646f4 commit c18323a
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions src/components/PickerDemo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,28 @@ export default function PickerDemo() {
<div
className={styles.PickerDemo}
style={{
height: `${pickerProps.height}px`,
minHeight: `${pickerProps.height}px`,
}}
>
<Picker
onEmojiClick={(emoji) =>
setTextareaValue(
(tv) => tv + (emoji?.isCustom ? `:${emoji.emoji}:` : emoji.emoji)
)
}
key={now}
autoFocusSearch={false}
{...pickerProps}
/>
<div
style={{
minWidth: `${pickerProps.width}px`,
display: "flex",
justifyContent: "center",
}}
>
<Picker
onEmojiClick={(emoji) =>
setTextareaValue(
(tv) =>
tv + (emoji?.isCustom ? `:${emoji.emoji}:` : emoji.emoji)
)
}
key={now}
autoFocusSearch={false}
{...pickerProps}
/>
</div>
<PickerControls
pickerProps={pickerProps}
updateState={updateState}
Expand Down

0 comments on commit c18323a

Please sign in to comment.