import { Component, linkEvent } from "inferno"; import { I18NextService } from "../../services"; import { EmojiMart } from "./emoji-mart"; import { Icon } from "./icon"; interface EmojiPickerProps { onEmojiClick?(val: any): any; disabled?: boolean; } interface EmojiPickerState { showPicker: boolean; } export class EmojiPicker extends Component { private emptyState: EmojiPickerState = { showPicker: false, }; state: EmojiPickerState; constructor(props: EmojiPickerProps, context: any) { super(props, context); this.state = this.emptyState; this.handleEmojiClick = this.handleEmojiClick.bind(this); } render() { return ( {this.state.showPicker && ( <>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
)} ); } togglePicker(i: EmojiPicker, e: any) { e.preventDefault(); i.setState({ showPicker: !i.state.showPicker }); } handleEmojiClick(e: any) { this.props.onEmojiClick?.(e); } }