Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div aura:id="toastId" class="slds-hide demo-only" style="height: 4rem;">
- <div class="slds-notify_container slds-is-relative">
- <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
- <span class="slds-assistive-text">success</span>
- <span class="slds-icon_container slds-icon-utility-success slds-m-right_small slds-no-flex slds-align-top" title="Description of icon when needed">
- </span>
- <div class="slds-notify__content">
- <h2 class="slds-text-heading_small "> Toast message Line 1 <br/> toast message Line 2</h2>
- </div>
- <lightning:buttonIcon iconName="utility:close" variant="bare" class="slds-button_icon-inverse" onclick="{! c.closeToast}" />
- </div>
- </div>
- </div>
- handleToast : function(component, event, helper) {
- var toastComp = component.find("toastId");
- $A.util.removeClass(toastComp, 'slds-hide');
- }
- closeToast : function(component, event, helper) {
- var toastComp = component.find("toastId");
- $A.util.addClass(toastComp, 'slds-hide');
- }
Add Comment
Please, Sign In to add comment