R/tab-panel-with-title.R

Defines functions tabPanelWithTitle

Documented in tabPanelWithTitle

#' Create a Styled Panel With Titles
#'
#' Create a panel that works well with dropdowns and adds title and subtitle.
#'
#' @param title text string for the tab title
#' @param description text string for the tab description
#' @param ... additional arguments
#'
#' @examples
#' tabPanelWithTitle("Wow", "Such data")
#'
#' @importFrom shiny tabPanel div
#'
#' @export
tabPanelWithTitle <- function(title, description = NULL, ...) {
  tabPanel(
    title,
    div(
      class = "tabTitlePanel",
      column(12,
             tabTitle(title),
             tabDesc(description)
      )
    ),
    ...
  )
}
pachadotdev/shinybird documentation built on Feb. 2, 2022, 12:27 a.m.