fix: Notification align when set width (#25168)

This commit is contained in:
xrkffgg 2020-06-23 11:40:33 +08:00 committed by GitHub
parent 4e60c28bd0
commit 157546480e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -21,9 +21,9 @@ const openNotification = () => {
message: 'Notification Title',
description:
'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
className: 'custom-class',
style: {
width: 600,
marginLeft: 335 - 600,
},
});
};

View File

@ -12,7 +12,6 @@
position: fixed;
z-index: @zindex-notification;
width: @notification-width;
max-width: ~'calc(100vw - 32px)';
margin-right: 24px;
@ -35,11 +34,19 @@
&-hook-holder,
&-notice {
position: relative;
width: @notification-width;
margin-bottom: @notification-margin-bottom;
margin-left: auto;
overflow: hidden;
background: @notification-bg;
border-radius: @border-radius-base;
box-shadow: @shadow-2;
.@{notification-prefix-cls}-topLeft &,
.@{notification-prefix-cls}-bottomLeft & {
margin-right: auto;
margin-left: 0;
}
}
&-hook-holder > &-notice {