Close Lightning Quick Action Modal

Lightning Component:

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,force:lightningQuickAction">
    <lightning:button variant="brand" type="button" label="Cancel" title="Cancel" onclick="{!c.handleCancel}"/> 
</aura:component>

Lightning JS Controller:

({
    handleCancel : function(component, event, helper) {
        //to close the quick action modal 
        $A.get("e.force:closeQuickAction").fire();
    },
})