'How to show red flag icon in Salesforce LWC using SLDS?
I am writing a lightning html code to display red flag using the SLDS. However, I only see grey flag. Can you help me to get the red variant of the icon? Thank you!
<lightning-icon icon-name="utility:priority" alternative-text="priority!" variant="priority" title="warning variant small" size="small"></lightning-icon>
[![Grey Flag][1]][1] [1]: https://i.stack.imgur.com/ikNC8.png
Solution 1:[1]
Use variant="error" which will display the icon in the red color
<lightning-icon
icon-name="utility:priority"
alternative-text="priority!"
variant="error"
title="warning variant small"
size="small">
</lightning-icon>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Naveen K N |