as_icon: Convert characters, shiny icons into 'fontawesome' 4

View source: R/menu-item.R

as_iconR Documentation

Convert characters, shiny icons into 'fontawesome' 4

Description

Convert characters, shiny icons into 'fontawesome' 4

Usage

as_icon(icon = NULL, class = "fas")

Arguments

icon

character or icon

class

icon class; change this when you are using 'fontawesome' professional version. The choices are 'fa' (compatible), 'fas' (strong), 'far' (regular), 'fal' (light), and 'fad' (duo-tone).

Value

'HTML' tag

Examples


if(interactive()){
as_icon("bookmark", class = "far")
as_icon("bookmark", class = "fas")

# no icon
as_icon(NULL)
}


shidashi documentation built on June 21, 2022, 5:05 p.m.