Created
April 9, 2018 00:05
-
-
Save lfreeland/56920e809a13c1374717b9890de65a8a to your computer and use it in GitHub Desktop.
Collapsible Section Lightning Component Markup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component> | |
<aura:attribute name="title" type="String" /> | |
<div class="slds-section slds-is-open" | |
aura:id="collapsibleSectionContainer"> | |
<h3 class="slds-section__title slds-theme_shade"> | |
<!-- button state defaults to false so state | |
represents "is collapsed" | |
--> | |
<lightning:buttonStateful labelWhenOff="{! v.title }" | |
labelWhenOn="{! v.title }" | |
iconNameWhenOff="utility:chevrondown" | |
iconNameWhenOn="utility:chevronright" | |
onclick="{! c.handleSectionHeaderClick }" | |
class="slds-section__title-action" /> | |
</h3> | |
<div class="slds-section__content" > | |
{! v.body } | |
</div> | |
</div> | |
</aura:component> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment