I have 2 lightning component. One component contains a button and another component needs to be opened in a popup on click of the button in first component.I don't have the code to open the second component in a popup.Need your help on this
1 Answer
BulkReply: function(component, event, helper){
var modalBody;
var lstEmails=component.get('v.lstEmails');
console.log('lstEmails---' + lstEmails);
$A.createComponent("c:EmailComponent", {lstEmails:lstEmails},
function(content, status) {
if (status === "SUCCESS") {
modalBody = content;
component.find('overlayLib').showCustomModal({
header: "Bulk Reply",
body: modalBody,
showCloseButton: true,
closeCallback: function() {
}
})
}
});
}
},
also use lightning:overlaylibrary
in component in which button are there
slds-popover slds-popover--panel
will provide the look and then adding Visibility classes from the JavaScript controller can do the show/hide.