Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
LikeButtonCmp
<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
state="{! v.buttonstate }"
variant="text"
labelWhenOff="Like"
labelWhenOn="Liked"
iconNameWhenOff="utility:like"
iconNameWhenOn="utility:like"
onclick="{! c.handleClick }"
/>
</aura:component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment