Skip to content

Commit 543c5b8

Browse files
committed
feat(value_box): Add id parameter
1 parent 2a95877 commit 543c5b8

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

R/card.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
#' together into one `wrapper` call (e.g. given `card("a", "b",
2929
#' card_body("c"), "d")`, `wrapper` would be called twice, once with `"a"` and
3030
#' `"b"` and once with `"d"`).
31-
#' @param id Provide a unique identifier for the card to report its state to
32-
#' Shiny. For example, using `id = "my_card"`, you can observe the card's full
33-
#' screen state with `input$my_card$full_screen`.
31+
#' @param id Provide a unique identifier for the `card()` or `value_box()` to
32+
#' report its state to Shiny. For example, using `id = "my_card"`, you can
33+
#' observe the card's full screen state with `input$my_card$full_screen`.
3434
#'
3535
#' @return A [htmltools::div()] tag.
3636
#'

R/value-box.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ value_box <- function(
9696
max_height = NULL,
9797
fill = TRUE,
9898
class = NULL,
99+
id = NULL,
99100
theme_color = deprecated()
100101
) {
101102
dots <- separate_arguments(...)
@@ -155,6 +156,7 @@ value_box <- function(
155156
class,
156157
if (!is.null(showcase)) showcase_layout$class
157158
),
159+
id = id,
158160
full_screen = full_screen,
159161
height = height,
160162
max_height = max_height,

man/card.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/value_box.Rd

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)