From 719f3ab4cc6f70b1e244898811980507a0c51bb4 Mon Sep 17 00:00:00 2001 From: fantasticit Date: Sun, 3 Apr 2022 20:22:03 +0800 Subject: [PATCH] fix: fix style for mobile display --- .../src/tiptap/wrappers/attachment/index.module.scss | 10 ++++++++++ .../client/src/tiptap/wrappers/attachment/index.tsx | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/client/src/tiptap/wrappers/attachment/index.module.scss b/packages/client/src/tiptap/wrappers/attachment/index.module.scss index aff231f8..93f9dbc5 100644 --- a/packages/client/src/tiptap/wrappers/attachment/index.module.scss +++ b/packages/client/src/tiptap/wrappers/attachment/index.module.scss @@ -13,5 +13,15 @@ justify-content: space-between; align-items: center; padding: 8px 16px; + + > div { + flex: 1; + overflow: auto; + } + + > span { + width: 64px; + flex-shrink: 0; + } } } diff --git a/packages/client/src/tiptap/wrappers/attachment/index.tsx b/packages/client/src/tiptap/wrappers/attachment/index.tsx index 00e557db..e6ca7c07 100644 --- a/packages/client/src/tiptap/wrappers/attachment/index.tsx +++ b/packages/client/src/tiptap/wrappers/attachment/index.tsx @@ -73,10 +73,10 @@ export const AttachmentWrapper = ({ editor, node, updateAttributes }) => {
{getFileTypeIcon(fileType)} - + {fileName}.{fileExt} + ({normalizeFileSize(fileSize)}) - ({normalizeFileSize(fileSize)})