Avoiding global styles in React

28 Views Asked by At

I need to show email preview in my application. The message is a piece of HTML and I do it like this:

          // some code...
                <div
                  className="w-4/5 rounded-lg p-2 bg-white mx-auto overflow-y-auto"
                  dangerouslySetInnerHTML={{ __html: messagePreview }}
                />
          // some code...

In this case it works well, but some tailwind defaults effect the message and it does not look the way it really is. Need some help :)

0

There are 0 best solutions below