v3.0.0
v3
- Compatible react 17 (using react-lifecycles-compat).
- Remove jss and embed the modal css.
The build is now done with rollup and the css is injected at runtime.
This will remove jss from the user bundle and remove the css entry point so now there is only one entry point 🎉. - Rename the
littleprop tocenter. - Added
onEscKeyDowncallback function. - Added
onOverlayClickcallback function. - Added
onEnteredcallback function. - Added
onExitedcallback function. - Added tests to the library.
- The close icon icon is now wrapped inside a button to handle the tab keypress changes. A new
closeButtonclass has been introduced. - Generate a commonjs and es6 module bundle.
- Typescript types.
- close issues #49, #16, #81, #96, #42.
Breaking changes
If you want to update from v2 to v3 you will have to do the following changes:
- Rename the
littleprop tocenteron theModalcomponent. - If you are using the
closeIconclass the styles moved to thecloseButtonclass that wraps the close icon component. - If you are using the css entry point
import 'react-responsive-modal/lib/react-responsive-modal.css';
import Modal from 'react-responsive-modal/lib/css';need to be changed to
import Modal from 'react-responsive-modal';the css is now bundled with the modal
This new version is inspired by the implementation of material-ui modal and react-modal thanks to them :)