From ba16ec02e5941346e4fd6be73e4a4ce1f6fc5bb8 Mon Sep 17 00:00:00 2001 From: GyDi <segydi@foxmail.com> Date: Wed, 15 Jun 2022 02:41:37 +0800 Subject: [PATCH] fix: style issue on mac --- src/components/base/base-notice.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/base/base-notice.tsx b/src/components/base/base-notice.tsx index d7909f4..39f1130 100644 --- a/src/components/base/base-notice.tsx +++ b/src/components/base/base-notice.tsx @@ -26,12 +26,13 @@ const NoticeInner = (props: InnerProps) => { type === "info" ? ( message ) : ( - <Box sx={{ display: "flex", alignItems: "center" }}> + <Box sx={{ width: 328, display: "flex", alignItems: "center" }}> {type === "error" && <ErrorRounded color="error" />} {type === "success" && <CheckCircleRounded color="success" />} <Typography - sx={{ ml: 1, wordWrap: "break-word", wordBreak: "break-all" }} + component="span" + sx={{ ml: 1, wordWrap: "break-word", width: "calc(100% - 35px)" }} > {message} </Typography> @@ -79,7 +80,7 @@ const Notice: NoticeInstance = (props) => { const onUnmount = () => { const result = ReactDOM.unmountComponentAtNode(container); - if (result && parent) setTimeout(() => parent.removeChild(container), 300); + if (result && parent) setTimeout(() => parent.removeChild(container), 500); }; ReactDOM.render(<NoticeInner {...props} onClose={onUnmount} />, container); -- GitLab