I have created a Material UI dialog that features some text and an Icon with a dropdown menu option. You can check out the demo here: https://codesandbox.io/s/prod-rain-1rwhf?file=/src/App.js
My goal is to properly position the Menu component so that it appears right below the Settings component when clicked. I have applied a 'position: relative' style to the parent element (Settings Icon) and a 'position: absolute' along with 'top: -10px' to the child element (Menu component), but this setup doesn't seem to be working as intended.
Can anyone provide guidance on how I can make sure that clicking the Settings icon triggers the appearance of the Menu directly beneath it, and also ensure that the positioning adjusts accordingly when the window is resized?
UPDATE:
If there are any issues accessing the codesandbox link, here is the code snippet:
App.js:
(code snippet for App.js)
styles.css:
(code snippet for styles.css)