Added onClose option

The onClose option is a function specified as a callback when a modal is closed for any reason.