react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

Notification content not showing in toast

Open znat opened this issue 2 years ago • 1 comments

Hi there :)

Do you want to request a feature or report a bug? A bug or a question

What is the current behavior? I simply npm installed and implemented as follows:

return (
    <Admin>
      <ToastContainer
        position="top-center"
        autoClose={5000}
        hideProgressBar
        newestOnTop={false}
        closeOnClick
        rtl={false}
        pauseOnFocusLoss
        draggable
        pauseOnHover
      />
      <form onSubmit={handleSubmit(onSubmit)}>
        ...
      </form>
    </Admin>
  );

But the toast content is directly shown in the page image

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React? Latest versions, using next.js

znat avatar Aug 18 '22 09:08 znat

@znat looks like you didn't import the required CSS

  import { ToastContainer, toast } from 'react-toastify';

  import 'react-toastify/dist/ReactToastify.css';

fkhadra avatar Aug 18 '22 19:08 fkhadra