mirror of
https://github.com/Thream/website.git
synced 2024-07-21 09:28:32 +02:00
26 lines
466 B
TypeScript
26 lines
466 B
TypeScript
import { Emoji as EmojiMart } from 'emoji-mart'
|
|
|
|
import { EMOJI_SET } from './emojiPlugin'
|
|
|
|
export interface EmojiProps {
|
|
value: string
|
|
size: number
|
|
tooltip?: boolean
|
|
}
|
|
|
|
export const Emoji: React.FC<EmojiProps> = (props) => {
|
|
const { value, size, tooltip = false } = props
|
|
|
|
return (
|
|
<EmojiMart
|
|
set={EMOJI_SET}
|
|
emoji={value}
|
|
size={size}
|
|
tooltip={tooltip}
|
|
fallback={() => {
|
|
return <>{value}</>
|
|
}}
|
|
/>
|
|
)
|
|
}
|