2022-06-23 19:41:48 -07:00
|
|
|
import data from '@emoji-mart/data';
|
|
|
|
import { Picker as EmojiPicker } from 'emoji-mart';
|
|
|
|
import React, { useRef, useEffect } from 'react';
|
2020-03-27 13:59:38 -07:00
|
|
|
|
2022-06-23 19:41:48 -07:00
|
|
|
// const categories = [
|
|
|
|
// 'recent',
|
|
|
|
// 'custom',
|
|
|
|
// 'people',
|
|
|
|
// 'nature',
|
|
|
|
// 'foods',
|
|
|
|
// 'activity',
|
|
|
|
// 'places',
|
|
|
|
// 'objects',
|
|
|
|
// 'symbols',
|
|
|
|
// 'flags',
|
|
|
|
// ];
|
|
|
|
|
|
|
|
export default function Picker(props) {
|
|
|
|
const ref = useRef();
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
const input = { ...props, data, ref };
|
|
|
|
|
|
|
|
new EmojiPicker(input);
|
|
|
|
}, []);
|
|
|
|
|
|
|
|
return <div ref={ref} />;
|
|
|
|
}
|