minutemailer / react-popup

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

wildClasses is no longer supported in version 0.9.3 #55

Closed yl-flyer closed 5 years ago

yl-flyer commented 6 years ago

I updated react-popup to version 0.9.3, i found that wildClasses is no longer supported is there another alternative?

ps: i use it to customize buttons

tbleckert commented 5 years ago

Ah, sorry for that, forgot to mention it as a breaking change.

Removing wildClasses is a part of implementing a better way of styling everything. Right now the classes follows the BEM methodology. So it works like this:

// Mount
<Popup className="mypopup" />

// Use
Popup.create({ className: 'alert' });

This would generate the class mypopup--alert instead of the unmodularized version alert. The same goes for buttons that uses the object format.

In an upcoming version you'll be able to define the class format yourself as well as a few other options.