minutemailer / react-popup

React popup component
http://minutemailer.github.io/react-popup/
MIT License
208 stars 71 forks source link

How to style text in the popup #54

Closed papeixoto closed 5 years ago

papeixoto commented 6 years ago

Hello. I want to bold some words of the content of the popup. I can't pass html tags when creating it, is there a workaround?

Sorry if this is not the right place to ask this. Thank you in advance.

tbleckert commented 5 years ago

Hi!

You can set the content to pretty much anything you want, like this:

Popup.create({
    title: 'Hello World!',
    content: (
        <div>
            It takes more than just a good looking <strong>body</strong>. You've got to have the heart and soul to go with it.
        </div>
    ),
    className: 'alert',
    buttons: {
        left: ['cancel'],
        right: [
            <span style={{padding: '0 15px'}} key="u">🦄</span>,
            {
                text: 'Ok!',
                className: 'success',
                action: Popup.close
            }
        ]
    },
});

I hope that answers your question.