bigbuffet-rw/app/soapbox/features/emoji/emoji_picker.tsx
2022-07-09 10:02:21 -07:00

34 lines
553 B
TypeScript

import { Picker as EmojiPicker, PickerProps } from 'emoji-mart';
import React, { useRef, useEffect } from 'react';
import data from './data';
// const categories = [
// 'recent',
// 'custom',
// 'people',
// 'nature',
// 'foods',
// 'activity',
// 'places',
// 'objects',
// 'symbols',
// 'flags',
// ];
//
function Picker(props: PickerProps) {
const ref = useRef(null);
useEffect(() => {
const input = { ...props, data, ref };
new EmojiPicker(input);
}, []);
return <div ref={ref} />;
}
export {
Picker,
};