Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aura:component>
- <!-- Handler -->
- <aura:Handler name="init" value="{!this}" action="{!c.doInit}" />
- <aura:registerEvent name="removeAttachment" type="c:removeAttachment"/>
- <aura:attribute name="filename" type="String" description="File name of the Attachement"/>
- <aura:attribute name="svgPath" type="String" description="Resource path for the file type icon"/>
- <div class="slds-attachments__item slds-box slds-box--x-small slds-theme--shade">
- <div class="slds-grid slds-grid--align-spread">
- <div class="slds-media">
- <div class="slds-media__figure">
- <span class="slds-icon_container">
- <c:svgIcon svgPath="{!v.svgPath}" class="slds-icon slds-icon--small" name="{!v.filename}" />
- </span>
- </div>
- <div class="slds-media__body">
- <a href="#void" title="{!v.filename}">{!v.filename}</a>
- </div>
- </div>
- <button class="slds-button slds-button--icon-bare" onclick="{!c.fireRemoveAttachmentEvt}">
- <c:svgIcon svgPath="/resource/SLDS0122/assets/icons/utility-sprite/svg/symbols.svg#close" class="slds-button__icon slds-icon--small" assistiveText="Remove this attachment" name="removeButton"/>
- </button>
- </div>
- </div>
- </aura:component>
Add Comment
Please, Sign In to add comment