Replies: 7 comments 4 replies
-
This is by design. This is for your probable animations and transitions. You need to set react-modal-global/styles/modal.scss Line 25 in 3d1a689 You can find more examples here If I didn't quite understand you, tell me more about your case. |
Beta Was this translation helpful? Give feedback.
-
@cooligus Could you give more information on it? |
Beta Was this translation helpful? Give feedback.
-
I have realised that CSSModules can have problem handling custom classes. react-modal-global/styles/modal.scss Line 25 in 3d1a689 I think it would be very powerful if we could write something like: <ModalContainer template={ModalLayout} activeClass="activeClass"}> Nice to have. |
Beta Was this translation helpful? Give feedback.
-
This code is in SCSS You can do the same by typing |
Beta Was this translation helpful? Give feedback.
-
Problem of this issue is: class |
Beta Was this translation helpful? Give feedback.
-
Sorry you had to wait so long. Let's say it's our App.tsx: import { Modal, ModalContainer } from "react-modal-global";
import { ReactNode } from "react";
import { useModalContext } from "react-modal-global";
const Example = () => {
return <>HELLLO</>;
};
const PopupLayout = (props: { children: ReactNode }) => {
return (
<div>
<div>Example management</div>
<div>{props.children}</div>
</div>
);
};
function App() {
//Modal.open(Example);
return (
<div className="App">
<ModalContainer template={PopupLayout} />
</div>
);
}
export default App; Anyway I use 1.2.1 version of the library and react still screams that useModalContext must be used within its context. |
Beta Was this translation helpful? Give feedback.
-
Thanks bro for example! (Any further reader reading it (add to readme info that dev need to add their own classes)) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions