dq_icon: Creates an icon element

Description Usage Arguments Value Author(s) Examples

View source: R/dq_icon.R

Description

Creates a html icon element with the specified icon name from the given library.

Usage

1
2
dq_icon(icon, lib = "font-awesome", color = "#ff8f00",
  bg_color = NULL, size = NULL, ...)

Arguments

icon

name of the icon to show

lib

library used, needed to append the proper dependency

color

icon color, can be any valid CSS color code

bg_color

icon background color, can be any valid CSS color code

size

character specifying the size of the icon, can be one of "xs", "sm", "lg", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"

...

additional attributes like style or class

Value

icon html element

Author(s)

richard.kunze

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Only run examples in interactive R sessions
if (interactive()) {

library(shiny)
addResourcePath("images", system.file("www", "img", package = "dqshiny"))
shinyApp(
  ui = fluidPage(
    dq_icon("table", size = "4x"),
    dq_icon("check", color = "red", lib = "glyphicon", size = "2x"),
    dq_icon("phone", bg_color = "green", size = "lg"),
    dq_icon("images/logo_daqana.svg", size = "3x")
  ),
  server = function(input, output, session) {}
)

}

dqshiny documentation built on May 2, 2019, 1:43 p.m.