Is there a way to use a custom icon on infoBox
on shinydashboard
. I am trying to use the example on hrbrmstr gist but it I can not find the place to update the infoBox
function.
library(shiny)
ui <- dashboardPage(
dashboardHeader(title = "Dynamic boxes"),
dashboardSidebar(),
dashboardBody(
fluidRow(
box(width = 2, actionButton("count", "Count")),
infoBoxOutput("ibox"),
valueBoxOutput("vbox")
)
)
)
server <- function(input, output) {
output$ibox <- renderInfoBox({
infoBox(
"Title",
input$count,
#icon = icon("credit-card")
icon=icon(list(src=x, width="80px"), lib="local")
)
})
output$vbox <- renderValueBox({
valueBox(
"Title",
input$count,
icon = icon("credit-card")
)
})
}
shinyApp(ui, server)