emoji-mart#EmojiData TypeScript Examples
The following examples show how to use
emoji-mart#EmojiData.
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: Chat.tsx From watchparty with MIT License | 6 votes |
class PickerMenuInner extends React.Component<{
addEmoji: (emoji: EmojiData) => void;
closeMenu: Function;
}> {
handleClickOutside = () => {
this.props.closeMenu();
};
render() {
return (
<div style={{ position: 'absolute', bottom: '60px' }}>
<Picker
set="google"
sheetSize={64}
theme="dark"
showPreview={false}
showSkinTones={false}
onSelect={this.props.addEmoji}
/>
</div>
);
}
}
Example #2
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>
);
})
Example #3
Source File: Chat.tsx From watchparty with MIT License | 5 votes |
addEmoji = (emoji: EmojiData) => {
this.setState({ chatMsg: this.state.chatMsg + (emoji as any).native });
};