infoBox()的外观-更改图标背景大小

时间:2019-04-11 05:09:17

标签: r shinydashboard infobox

我试图了解infoBox()的灵活性。

我的文本经常超出信息框的大小,或者想要增加该值的字体大小。结果,infoBox在图标下创建空白。有没有办法使图标变大(使其下方没有白色)或扩大图标的背景?

下面是一个示例:

library(shinydashboard)


shinyApp(
  ui = dashboardPage(
    dashboardHeader(),
    dashboardSidebar(),
    dashboardBody(



      fluidRow(
        infoBox(title = "Some title", 
                value = 10, 
                subtitle = "No white space below the icon, great look!", 
                icon = icon("thumbs-up"), 
                width = 4),

        infoBox(title = "Some title 2", 
                value = tags$p(style = "font-size: 35px;", 10), 
                subtitle = "White space below the icon on full screen", 
                icon = icon("thumbs-up"), 
                width = 4), 

        infoBox(title = "Some title 2", 
                value = tags$p(style = "font-size: 35px;", 10), 
                subtitle = "Icon is larger, but not the background", 
                icon = tags$i(style = "font-size: 70px;", icon("thumbs-up")), 
                width = 4)
        )



    )


  ),


  server = function(input, output, session) { }
)

0 个答案:

没有答案