Releases: wethegit/react-modal
Releases · wethegit/react-modal
v3.1.0
v3.0.0
Major Changes
-
#79
6c0e7f9Thanks @andrewrubin! - - RemovedappendToBodyprop.-
The
appendToBodyprop has been removed. This prop was previously used to determine whether the modal should be appended to the body element. -
Added
renderToprop.- Introduced the
renderToprop, which accepts an HTMLElement where the modal will be appended. This provides greater flexibilty, allowing users to specify any element to render the modal, including the body. This change enhances the customization options for the modal rendering.
- Introduced the
-
Mark argument of hook as optional #62
-
Before
<Modal appendToBody={true} />
-
After
<Modal renderTo={modalRef} />
-
v2.2.2
Patch Changes
- #18
888f892Thanks @marlonmarcello! - fix: commonjs support
v2.2.1
Patch Changes
- #16
4a7ac9bThanks @marlonmarcello! - hotfix: exported types
v2.2.0
Minor Changes
- #14
22e9f45Thanks @andrewrubin! - Fix: positiong class names not being passed down if appendToBody is true
v2.0.2
Patch Changes
- #12
f603cd2Thanks @marlonmarcello! - Fixes and issue where the modal would lock the body even thoughappendToBodywasn't set totrue
v2.0.1
Patch Changes
- #10
1e4fba5Thanks @marlonmarcello! - fix: ensures empty params doesn't throw
v2.0.0
Major Changes
-
#7
4512c52Thanks @marlonmarcello! - # V2Breaking changes
Seriously, everything.
Why
The old design of the modal was good but it had an achilles heel, it used an internal context to handle the transition and syncing that with the state which caused:
- Actions to be tied to a context, adding custom components to close the modal for example was a bit annoying
- Animation and state were too tightly coupled and not exposed for further customization
What's new
The modal is now a controlled component, you can control the state of the modal from outside using the hook
useModalwhich also exposes the state so you can use further customize the Modal and even the child components.
v1.0.2
v1.0.2
v1.0.0
feature: vite (#5) * migrating to vite