mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-01 18:19:55 +00:00
043b522ff1
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Update src/shared/utils/app/convert-comment-sort-type.ts Co-authored-by: SleeplessOne1917 <abias1122@gmail.com> * prettier pass --------- Co-authored-by: SleeplessOne1917 <abias1122@gmail.com>
30 lines
706 B
TypeScript
30 lines
706 B
TypeScript
import { Component } from "inferno";
|
|
import { getEmojiMart } from "../../markdown";
|
|
|
|
interface EmojiMartProps {
|
|
onEmojiClick?(val: any): any;
|
|
pickerOptions: any;
|
|
}
|
|
|
|
export class EmojiMart extends Component<EmojiMartProps> {
|
|
constructor(props: any, context: any) {
|
|
super(props, context);
|
|
this.handleEmojiClick = this.handleEmojiClick.bind(this);
|
|
}
|
|
componentDidMount() {
|
|
const div: any = document.getElementById("emoji-picker");
|
|
if (div) {
|
|
div.appendChild(
|
|
getEmojiMart(this.handleEmojiClick, this.props.pickerOptions)
|
|
);
|
|
}
|
|
}
|
|
|
|
render() {
|
|
return <div id="emoji-picker"></div>;
|
|
}
|
|
|
|
handleEmojiClick(e: any) {
|
|
this.props.onEmojiClick?.(e);
|
|
}
|
|
}
|