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
Divlo 91a87199c4
feat: edit/delete a Message (#30)
Co-authored-by: Walidoux <ma.walidkorchi@icloud.com>
2022-08-29 21:24:38 +02:00

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}</>
}}
/>
)
}