R/bulma-box.R

Defines functions bulma_box

Documented in bulma_box

#' @title
#' Bulma Box
#'
#' @description
#' A white box to contain other elements. The `box` element is a simple
#' container with a white background, some padding, and a box shadow.
#'
#' You can include form elements or media objects.
#'
#' [Box](https://bulma.io/documentation/elements/box/)
#'
#' @param ... (tag) content
#' @param tag (fn) default HTML container
#'
#' @family Bulma Elements
#' @export
bulma_box <- function(..., tag = tags$div) {

  assert_function(tag)

  tag(class = "box", ...) %>%
    add_class("bulma_box")

}
tjpalanca/bulma.R documentation built on Dec. 23, 2021, 10:58 a.m.