Guest User

Untitled

a guest
Feb 22nd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. <div class="slds-notify_container">
  2. <div class="slds-notify slds-notify--toast slds-theme--error" role="alert">
  3. <span class="slds-assistive-text">Error</span>
  4. <button class="slds-button slds-notify__close slds-button--icon-inverse">
  5. <svg aria-hidden="true" class="slds-button__icon slds-button__icon--large">
  6. <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#close"></use>
  7. </svg>
  8. <span class="slds-assistive-text">Close</span>
  9. </button>
  10. <div class="slds-notify__content slds-grid">
  11. <svg aria-hidden="true" class="slds-icon slds-icon--small slds-m-right--small slds-col slds-no-flex">
  12. <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#warning"></use>
  13. </svg>
  14. <div class="slds-col slds-align-middle">
  15. <h2 class="slds-text-heading--small">You encountered some errors when trying to save edits to Samuel Smith.</h2>
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20.  
  21. <aura:component>
  22. <lightning:notificationsLibrary aura:id="notifLib"/>
  23. <lightning:button name="notice" label="Show Notice" onclick="{!c.handleShowNotice}"/>
  24. </aura:component>
  25.  
  26. <aura:component>
  27. <lightning:notificationsLibrary aura:id="notifLib"/>
  28. <lightning:button name="notice" label="Show Notice" onclick="{!c.handleShowNotice}"/>
  29. </aura:component>
  30.  
  31. handleShowNotice : function(component, event, helper) {
  32. component.find('notifLib').showNotice({
  33. "variant": "error",
  34. "header": "Something has gone wrong!",
  35. "message": "Unfortunately, there was a problem updating the record.",
  36. closeCallback: function() {
  37. alert('You closed the alert!');
  38. }
  39. });
Add Comment
Please, Sign In to add comment