tiptap: fix tooltip style

pull/29/head
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>
<Space>
{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}
<Text type="tertiary">({normalizeFileSize(fileSize)})</Text>
</Text>