tiptap: fix emoji-picker trigger

This commit is contained in:
fantasticit 2022-04-26 08:43:26 +08:00
parent 4fac550c5c
commit ae9961ec45
2 changed files with 6 additions and 4 deletions

View File

@ -92,7 +92,7 @@ export const EmojiPicker: React.FC<IProps> = ({ onSelectEmoji, children }) => {
</div> </div>
} }
> >
<span>{children}</span> {children}
</Popover> </Popover>
); );
}; };

View File

@ -14,9 +14,11 @@ export const Emoji: React.FC<{ editor: Editor }> = ({ editor }) => {
return ( return (
<EmojiPicker onSelectEmoji={setEmoji}> <EmojiPicker onSelectEmoji={setEmoji}>
<span>
<Tooltip content="插入表情"> <Tooltip content="插入表情">
<Button theme={'borderless'} type="tertiary" icon={<IconEmoji />} /> <Button theme={'borderless'} type="tertiary" icon={<IconEmoji />} />
</Tooltip> </Tooltip>
</span>
</EmojiPicker> </EmojiPicker>
); );
}; };