I have a modal that is created using styled-components. It is wrapped with an overlay. When I click the overlay the modal closes itself, but when I click the modal's content it also closes. The idea is to close the overlay only if we go outside the (box/content). I believe it has something to do with the CSS. How can we fix this?
In order to be able to reproduce the issue I've created a sandbox: https://codesandbox.io/s/zen-cache-q5w0n