Closed BeroBurny closed 2 years ago
@teodosii I am experiencing the same issue. I did some investigation and it seems you've set a max-width: 350px
in all the centered positions indeed:
.notification-container--bottom-center, .notification-container--center, .notification-container--top-center {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
left: calc(50% - 175px);
max-width: 350px;
}
This could be fixed like so:
left: 50%;
transform: translate(-50%, 0);
min-width: 350px;
Fixed in 3.1.0
, it was using width: 100%
for centered containers instead of the supplied width.
property
width
provided inaddNotificitaion
is not working on propertycontainer
propertiestop-center
,center
andbottom-center
Code used to generate notifications from screenshot
```typescript ['top-left', 'top-right', 'top-center', 'center', 'bottom-left', 'bottom-right', 'bottom-center'].forEach(container => { store.addNotification({ title: "Wonderful!", message: "teodosii@react-notifications-component", type: "danger", insert: "top", container: container as ReactNotificationOptions['container'], dismiss: { duration: 10900, }, width: 700, }); }) ```