Byo_toplayer.Autoclosetype t = private Bonsai_web.Vdom.Attr.tval create :
close:unit Bonsai_web.Effect.t Bonsai_web.Bonsai.t ->
?close_on_click_outside:Close_on_click_outside.t Bonsai_web.Bonsai.t ->
?close_on_right_click_outside:Close_on_click_outside.t Bonsai_web.Bonsai.t ->
?close_on_esc:bool Bonsai_web.Bonsai.t ->
Bonsai_web.Bonsai.graph @ local ->
t Bonsai_web.Bonsai.tcreate allows you to react to outside clicks and escapes for popovers and modals where you own the state.
Notably, the close effect is bonked, so that if the user clicks on an element that opens the popover on click, the close will win. This might not be desirable when clicking outside to open a _different_ popover, in which case you might want to bonk your open_ effect.