Skip to content
Snippets Groups Projects
Unverified Commit ba16ec02 authored by GyDi's avatar GyDi
Browse files

fix: style issue on mac

parent 55b7af26
No related branches found
No related tags found
No related merge requests found
...@@ -26,12 +26,13 @@ const NoticeInner = (props: InnerProps) => { ...@@ -26,12 +26,13 @@ const NoticeInner = (props: InnerProps) => {
type === "info" ? ( type === "info" ? (
message message
) : ( ) : (
<Box sx={{ display: "flex", alignItems: "center" }}> <Box sx={{ width: 328, display: "flex", alignItems: "center" }}>
{type === "error" && <ErrorRounded color="error" />} {type === "error" && <ErrorRounded color="error" />}
{type === "success" && <CheckCircleRounded color="success" />} {type === "success" && <CheckCircleRounded color="success" />}
<Typography <Typography
sx={{ ml: 1, wordWrap: "break-word", wordBreak: "break-all" }} component="span"
sx={{ ml: 1, wordWrap: "break-word", width: "calc(100% - 35px)" }}
> >
{message} {message}
</Typography> </Typography>
...@@ -79,7 +80,7 @@ const Notice: NoticeInstance = (props) => { ...@@ -79,7 +80,7 @@ const Notice: NoticeInstance = (props) => {
const onUnmount = () => { const onUnmount = () => {
const result = ReactDOM.unmountComponentAtNode(container); 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); ReactDOM.render(<NoticeInner {...props} onClose={onUnmount} />, container);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment