ShareModal API

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

Props

Props

Type

Description

Default

onClose

function

Callback triggered on closing the share modal and will activate upon pressing "Esc" or clicking on the overlay.

_

onEscPress?

(event: KeyboardEvent) => void

Callback fired when "Esc" key is pressed along with onClose.

_

onOverlayClick?

function

Callback fired when the overlay is clicked along with onClose

_

closeOnEsc?

boolean

If 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?

boolean

If 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