Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created December 8, 2019 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/f1b5ff12241041878e201c0d89e79dee to your computer and use it in GitHub Desktop.
Save arun12209/f1b5ff12241041878e201c0d89e79dee to your computer and use it in GitHub Desktop.
StatefulButtonCmp
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >
<aura:attribute name="buttonstate" type="Boolean" default="false"/>
<lightning:buttonStateful
labelWhenOff="Follow"
labelWhenOn="Following"
labelWhenHover="Unfollow"
iconNameWhenOff="utility:add"
iconNameWhenOn="utility:check"
iconNameWhenHover="utility:close"
state="{! v.buttonstate }"
onclick="{! c.handleClick }"
/>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment