Is it possible to have only one method for closing all types of modals?