This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/components/Emoji/Emoji.tsx

23 lines
392 B
TypeScript
Raw Normal View History

2021-10-24 05:19:39 +02:00
import { Emoji as EmojiMart } from 'emoji-mart'
import { emojiSet } from './emojiPlugin'
export interface EmojiProps {
value: string
size: number
}
export const Emoji: React.FC<EmojiProps> = (props) => {
const { value, size } = props
return (
<EmojiMart
set={emojiSet}
emoji={value}
size={size}
tooltip
fallback={() => <>{value}</>}
/>
)
}