Is your feature request related to a problem? Please describe.
UIs that present 'modal' or 'popover' behavior often overlook an important UX element—dismissing the overlay UI when the user tries to access the UI behind it.
2U has a hook that takes an element ref, and a callback, and then calls that callback whenever a click is detected outside of the element. This could be a building block for modal behaviors—a simple solution for an important detail that is easy to overlook.
Is your feature request related to a problem? Please describe.
UIs that present 'modal' or 'popover' behavior often overlook an important UX element—dismissing the overlay UI when the user tries to access the UI behind it.
2U has a hook that takes an element ref, and a callback, and then calls that callback whenever a click is detected outside of the element. This could be a building block for modal behaviors—a simple solution for an important detail that is easy to overlook.
Describe the solution you'd like
Extract and package useClickOutsideCallback from 2U
Describe alternatives you've considered
🤔
Additional context