Closed cooligus closed 1 year ago
This is by design. This is for your probable animations and transitions. You need to set display: none
when popup is not active.
Take a look at the example
https://github.com/FrameMuse/react-modal-global/blob/3d1a689dc6d3227cc26c056d29c0add981354e1b/styles/modal.scss#L25
You can find more examples here https://github.com/FrameMuse/react-modal-global#playgrounds
If I didn't quite understand you, tell me more about your case.
@cooligus Could you give more information on it?
I have realised that CSSModules can have problem handling custom classes.
https://github.com/FrameMuse/react-modal-global/blob/3d1a689dc6d3227cc26c056d29c0add981354e1b/styles/modal.scss#L25 I think it would be very powerful if we could write something like:
<ModalContainer template={ModalLayout} activeClass="activeClass"}>
Nice to have.
This code is in SCSS react-modal-global/styles/modal.scss
You can do the same by typing .modal--active { ... }
in plain CSS.
Describe the bug When using template prop it's in ModalContainer modal is always rendered.
I have a layout:
And I have a ModalContainer:
It always renders without triggering any opens.