teodosii / react-notifications-component

Delightful and highly customisable React Component to notify your users
https://teodosii.github.io/react-notifications-component/
MIT License
1.27k stars 73 forks source link

Problem when setting high width. #67

Closed DiegoDevBittencourt closed 3 years ago

DiegoDevBittencourt commented 4 years ago

Sup guys! So this is my code:

import { store } from 'react-notifications-component';

import 'react-notifications-component/dist/theme.css'
import 'animate.css'

export default Notification = {

  dangerNotification: function (message) {

    store.addNotification({
      message: message,
      type: "danger",
      insert: "top",
      container: "top-right",
      animationOut: ["animated", "fadeOut"],
      width: 600,
      dismiss: {
        duration: 4000,
        onScreen: true,
        showIcon: true,
      },
    });
  }
}

And this is how the notification appears on my screen:

not2

I want that the notification appears like this:

not1

But bigger, the problem is that when I change the width size to 350+ it will cut the right edge. So, how can I fix this? Also the <ReactNotification /> are inside my <app/> component in root.

teodosii commented 4 years ago

Hey, could you please post a gif to illustrate this issue? The container should be properly placed and the notification should take width accordingly to the container. @DiegoBittencourtOfficial

DiegoABittencourt commented 4 years ago

@teodosii here it go: ezgif-2-6786c93cb540

teodosii commented 3 years ago

Containers have changed in 3.0.0 and are quite dynamic in terms of width. Fixed in 3.0.0