SHARE
TWEET

Untitled

a guest Jun 18th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <aura:component implements="flexipage:availableForAllPageTypes" access="global">
  2.     <aura:attribute name="notifications" type="List"/>
  3.     <aura:attribute name="isMuted" type="Boolean" default="false"/>
  4.     <aura:handler name="init" value="{!this}" action="{!c.onInit}"/>
  5.     <aura:registerEvent name="toastEvent" type="force:showToast"/>
  6.     <div class="countainer">
  7.         <!-- Header -->
  8.         <div class="slds-p-around_x-small slds-border_bottom slds-theme_shade">
  9.             <div class="slds-grid slds-grid_align-spread slds-grid_vertical-align-center">
  10.                 <div>
  11.                     <span class="slds-badge">{!v.notifications.length}</span>
  12.                 </div>
  13.                 <div>
  14.                     <lightning:buttonIcon onclick="{!c.onClear}" iconName="utility:delete" title="Clear notifications" alternativeText="Clear notifications" variant="border-filled"/>
  15.                     <lightning:buttonIcon onclick="{!c.onToggleMute}" iconName="{!v.isMuted ? 'utility:volume_off' : 'utility:volume_high'}" title="{!v.isMuted ? 'Unmute notifications' : 'Mute notifications'}" alternativeText="Toggle mute" variant="border-filled"/>
  16.                 </div>
  17.             </div>
  18.         </div>
  19.         <!-- Notification list -->
  20.         <div class="slds-container_fluid slds-scrollable_y content">
  21.             <aura:iteration items="{!v.notifications}" var="notification">
  22.                 <div class="slds-p-around_small slds-border_top">
  23.                     <div class="slds-grid slds-grid_align-spread slds-has-flexi-truncate">
  24.                         <p>{!notification.message}</p>
  25.                         <p class="slds-text-color_weak slds-p-left_x-small">{!notification.time}</p>
  26.                     </div>
  27.                 </div>
  28.             </aura:iteration>
  29.         </div>
  30.     </div>
  31. </aura:component>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top