You need to sign in to do that
Don't have an account?
Mohita Kalra
How to change Icon colour on the button.
Hi All...I am creating a button , where I have to put brand as variant and also need to get lead icon on it...I tried something like this but the icon doesnt appear because of the brand...is there anyway I can change icon colour to white on this button.
<lightning:button onclick="{!c.createLead}"
variant="brand"
abel="New Lead"
iconName="standard:lead"
disabled = "false"/>
If I use variant as Brand_outline , I can see the lead icon...But I cant use Brand_Outine and have to use brand only...so i thought of getting the colour changed to white for this icon...so that it becomes visible.
<lightning:button onclick="{!c.createLead}"
variant="brand-outline"
abel="New Lead"
iconName="standard:lead"
disabled = "false"/>
<lightning:button onclick="{!c.createLead}"
variant="brand"
abel="New Lead"
iconName="standard:lead"
disabled = "false"/>
If I use variant as Brand_outline , I can see the lead icon...But I cant use Brand_Outine and have to use brand only...so i thought of getting the colour changed to white for this icon...so that it becomes visible.
<lightning:button onclick="{!c.createLead}"
variant="brand-outline"
abel="New Lead"
iconName="standard:lead"
disabled = "false"/>
This is strange. According to documentation (https://developer.salesforce.com/docs/component-library/bundle/lightning:button/example#lightningcomponentdemo:exampleRegularButtonsIcon), the color is changed automatically.
Maybe there is something wrong in your brand css declaration ?
Best regards,
Barthélemy