[Cashtab] Add click-outside-area closing effect for NavWrapper using event bubbling
Summary:
Implemented a click-outside closing mechanism for the settings window using event bubbling instead of useEffect, to maintain consistency with existing code style.
This approach allows the NavWrapper to automatically close when users click outside its boundaries.
Test Plan:
Tested on Chrome and Safari browsers across various screen sizes, with the navigation menu closing effect working smoothly.
npm test passes.
Reviewers: emack, bytesofman, O1 Bitcoin ABC, #bitcoin_abc
Reviewed By: emack, bytesofman, O1 Bitcoin ABC, #bitcoin_abc
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17756