ShareModal API

API reference docs for theShareModalcomponent. For examples and details on the usage of this component, visit the component demo page.

Props

PropsTypeDescriptionDefault
onClosefunctionCallback triggered on closing the share modal and will activate upon pressing "Esc" or clicking on the overlay._
onEscPress?(event: KeyboardEvent) => voidCallback fired when "Esc" key is pressed along with onClose._
onOverlayClick?functionCallback fired when the overlay is clicked along with onClose_
closeOnEsc?booleanIf set to false, the share modal will not close when the Esc key is pressed, and the Esc keydown event along with the onClose callback won't be attached. Similarly, onEscPress will have no effect.true
closeOnOverlayClick?booleanIf set to false, the share modal will not close when the overlay is clicked, and the onClose callback won’t be attached. Similarly, onOverlayClick will have no effect.true