Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valueBox arguments inconsistent #283

Open
zx8754 opened this issue Sep 28, 2020 · 0 comments
Open

valueBox arguments inconsistent #283

zx8754 opened this issue Sep 28, 2020 · 0 comments

Comments

@zx8754
Copy link

zx8754 commented Sep 28, 2020

Both flexdashboard and shinydashboard have valueBox function, with similar arguments, in one we need to use icon = "fa-calendar" in the other icon = icon("calendar"), one has caption the other has subtitle, maybe harmonise them?

flexdashboard::valueBox(value, caption = NULL, icon = NULL, color = NULL, href = NULL)
shinydashboard::valueBox(value, subtitle, icon = NULL, color = "aqua", width = 4, href = NULL)

Related SO post
See example:

flexdashboard test.rmd

---
title: "My Icon"
output: 
  flexdashboard::flex_dashboard
---

```{r}
library(flexdashboard)
valueBox(42, caption = "my caption", icon = "fa-calendar")
```

Output:

image

shinydashboard

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(),
  dashboardSidebar(),
  dashboardBody(
    valueBox(42, "My Icon", icon = icon("calendar")),
  )
)

server <- function(input, output) { }

shinyApp(ui, server)

Output:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant