Callback fired when the component requests to be closed. The reason parameter can optionally be used to control the response to onClose.
reason
onClose
{string} reason Can be: "escapeKeyDown", "backdropClick".
"escapeKeyDown"
"backdropClick"