R/checkbox.R

#' Create a NES Checkbox
#'
#' @param id The input slot that will be used to access the value.
#' @inheritParams shiny::checkboxInput
#'
#' @return a tagList
#' @export
#'
#' @importFrom shiny checkboxInput
#'
checkbox <- function(id, label, value = FALSE, width = NULL){
  x <- checkboxInput(id, label, value, width)
  x$children[[1]]$children[[1]]$children[[1]]$attribs <- c(
    class="nes-checkbox", x$children[[1]]$children[[1]]$children[[1]]$attribs
  )
  x
}
ColinFay/nessy documentation built on May 29, 2019, midnight