R/white_small_well.R

Defines functions white_small_well

Documented in white_small_well

#' Adds Class Small Well and overflow-x property to HTML output element
#'
#' @description `r lifecycle::badge("stable")`
#' @param ... other arguments to pass to tag object's div attributes.
#'
#' @details `white_small_well` is intended to be used with [shiny::uiOutput()].
#' The overflow-x property is set to auto so that a scroll bar is added
#' when the content overflows at the left and right edges of the output window.
#' For example, this is useful for displaying wide tables.
#'
#' @return An HTML output element with class Small Well and overflow-x property
#' @export
#'
#' @examples
#'
#' white_small_well(shiny::htmlOutput("summary"))
white_small_well <- function(...) {
  shiny::tagList(
    include_css_files(pattern = "custom"),
    tags$div(
      class = "well well-sm bg-white",
      ...
    )
  )
}

Try the teal.widgets package in your browser

Any scripts or data that you put into this service are public.

teal.widgets documentation built on May 29, 2024, 2:41 a.m.