emoji-mart#NimblePicker TypeScript Examples
The following examples show how to use
emoji-mart#NimblePicker.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Picker.tsx From tailchat with GNU General Public License v3.0 | 6 votes |
EmojiPicker: React.FC<EmojiPickerProps> = React.memo((props) => {
const { isDarkMode } = useColorScheme();
const handleSelect = useCallback(
(emoji: EmojiData) => {
const code = emoji.colons;
if (isValidStr(code)) {
props.onSelect(code);
}
},
[props.onSelect]
);
return (
<div className="emoji-picker">
<NimblePicker
set="twitter"
data={emojiData}
theme={isDarkMode ? 'dark' : 'light'}
showPreview={false}
showSkinTones={false}
emojiTooltip={false}
onSelect={handleSelect}
/>
</div>
);
})