mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
fix: Notification align when set width (#25168)
This commit is contained in:
parent
4e60c28bd0
commit
157546480e
@ -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,
|
||||
},
|
||||
});
|
||||
};
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user