Skip to content

Commit 5317650

Browse files
committed
update test by adding more variants
break long lines in boxes.R
1 parent 1658b11 commit 5317650

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

R/boxes.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ infoBox <- function(title, value = NULL, subtitle = NULL,
120120
#' @param collapsed If TRUE, start collapsed. This must be used with
121121
#' \code{collapsible=TRUE}.
122122
#' @param ... Contents of the box.
123-
#' @param wrench Adds a dropdown menu.
123+
#' @param wrench Adds a dropdown menu. By default it does not (false).
124124
#' @param wrenchOptions Add menu items to the wrench icon. This must be used with
125-
#' \code{wrench=TRUE}.
125+
#' \code{wrench=TRUE}. Can be also a \code{list(...)} of \code{tags$li(...)}.
126126
#'
127127
#' @family boxes
128128
#'
@@ -308,7 +308,6 @@ box <- function(..., title = NULL, footer = NULL, status = NULL,
308308
tags$button(class = "btn btn-box-tool dropdown-toggle", `type` = "button",
309309
`data-toggle` = "dropdown", shiny::icon("wrench")),
310310
tags$ul(class = "dropdown-menu", `role` = "menu", wrenchOptions)
311-
## TODO: how to display them ?
312311
)
313312
}
314313

man/box.Rd

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

tests-manual/box.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ body <- dashboardBody(
4242
)
4343
),
4444
box(title = "Histogram box title",
45-
status = "warning", solidHeader = TRUE, collapsible = F, wrench = T, wrenchOptions = tags$li(a(href="https://google.cz", "Click here!")),
45+
status = "info", solidHeader = TRUE, collapsible = F, wrench = T,
46+
wrenchOptions = list(tags$li(a(href="https://google.cz", "google czech",style="color: red", target="_blank")),
47+
tags$li(a(href="https://www.polygon.com", "polygon!",style="color: yellow", target="_blank"))),
4648
plotOutput("plot", height = 250)
4749
)
4850
),
@@ -165,7 +167,7 @@ header <- dashboardHeader(
165167
shinyApp(
166168
ui = dashboardPage(
167169
header,
168-
dashboardSidebar(),
170+
dashboardSidebar(disable = T),
169171
body
170172
),
171173
server = server

0 commit comments

Comments
 (0)