react-hot-toast icon indicating copy to clipboard operation
react-hot-toast copied to clipboard

Really Long Toast Messages Overflow Toast Container

Open kharithomas opened this issue 2 years ago • 1 comments

When messages are really long they overflow the actual toast container.

example

Currently, I have my Toaster setup like:

<Toaster position="top-center" reverseOrder={false} />

Using the toast like:

toast.success(
      "This is a very looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong toast message",
      {
        style: {
          background: "#333",
          color: "#fff",
          textOverflow: "ellipsis",
          overflowWrap: "break-word"
        },
        duration: 5000
      }
    );

It seems even using textOverflow or overflowWrap properties don't work.

kharithomas avatar Apr 30 '22 18:04 kharithomas

This could probably be fixed with a jsx span element as a message that has the word break styling.

DutchJelly avatar May 04 '22 12:05 DutchJelly