waltonzt
1/15/2018 - 6:44 PM

Lightning

Lightning Components

lightning:card

<div class="slds-card">
</div>

Close Quick Actions

$A.get("e.force:closeQuickAction").fire()

Refresh Screen

$A.get('e.force:refreshView').fire();

Lightning Design System

Alignment

slds-align_absolute-center

Margin

slds-m-top_small
slds-m-right_small

xxx-small to xx-large

Padding

slds-p-top_small
slds-p-right_small

xxx-small to xx-large

Toast

showToast : function(title, message, type) {
  var toastEvent = $A.get('e.force:showToast');
  toastEvent.setParams({
    'title': title,
    'message' : message,
    'type' : type
  });
  toastEvent.fire();
}

If Statement

<aura:if isTrue="{!v.edit}">
    <ui:button label="Edit"/>
    <aura:set attribute="else">
        You can’t edit this.
    </aura:set>
</aura:if>

Links

Lightning Components Developer Guide