@serenity-is/corelib / faIcon
Function: faIcon()
faIcon(
key,color?):string
Defined in: src/base/icons.ts:52
Builds the CSS class string for a Font Awesome (solid/regular) icon.
Parameters
key
Icon key from faIconKey (without the fa- prefix).
color?
Optional TextColor appended as a text-* class.
Returns
string
Class string such as "fa fa-home" or "fa fa-home text-danger".
Example
faIcon("home"); // "fa fa-home"
faIcon("home", "primary"); // "fa fa-home text-primary"