Skip to content

v3.0.0

Choose a tag to compare

@pradel pradel released this 29 Apr 17:31
· 391 commits to master since this release

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 little prop to center.
  • Added onEscKeyDown callback function.
  • Added onOverlayClick callback function.
  • Added onEntered callback function.
  • Added onExited callback function.
  • Added tests to the library.
  • The close icon icon is now wrapped inside a button to handle the tab keypress changes. A new closeButton class 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 little prop to center on the Modal component.
  • If you are using the closeIcon class the styles moved to the closeButton class 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 :)