tiptap: fix tooltip style

This commit is contained in:
fantasticit 2022-04-26 08:53:50 +08:00
parent ae9961ec45
commit 758f376a16
1 changed files with 6 additions and 1 deletions

View File

@ -73,7 +73,12 @@ export const AttachmentWrapper = ({ editor, node, updateAttributes }) => {
<div> <div>
<Space> <Space>
{getFileTypeIcon(fileType)} {getFileTypeIcon(fileType)}
<Text style={{ marginLeft: 8 }} ellipsis={{ showTooltip: true }}> <Text
style={{ marginLeft: 8 }}
ellipsis={{
showTooltip: { opts: { content: `${fileName}.${fileExt}`, style: { wordBreak: 'break-all' } } },
}}
>
{fileName}.{fileExt} {fileName}.{fileExt}
<Text type="tertiary">({normalizeFileSize(fileSize)})</Text> <Text type="tertiary">({normalizeFileSize(fileSize)})</Text>
</Text> </Text>