Open
Description
Summary:
Steps to reproduce:
- Set app element to the app root:
ReactModal.setAppElement('#root');
- Create a basic modal with props like these:
</nav>
<ReactModal
isOpen={state.delete}
onRequestClose={ () => { setState(prevState => ({ delete: !prevState.delete })) } }
shouldCloseOnOverlayClick={true}
className="h-auto m-auto card px-5 py-4"
style={{
overlay: {
'background': 'rgba(138, 145, 153, .66)'
},
content: {
'width': '400px',
'marginTop': '25vh',
}
}}
>
- Modal is positioned like a fixed element in the center of the viewport.
What I want
I want to position this modal relative to it's parent component. This modal is for a user menu popup, and it needs to appear below a fixed navbar. The position of the user image is not static. The site is responsive, so the dropdown must be relative to that parent.
Link to example of issue:
https://www.google.com has a similar modal popup when you sign in with an account.
Here is an example image:
https://imgur.com/KIykuAc
Any help would be apprecieted.