R/toggle_input.R

Defines functions toggle_input

Documented in toggle_input

#' toggle_input
#' @export
toggle_input <- function(id, label = NULL, fitted = F, checked = F, class = NULL){
  fit <- NULL
  check <- NULL
  if (fitted) fit <- "fitted"
  if (checked) check <- "checked"
  variation <- paste("ui", fit, class, "checkbox", sep = " ")
  
  #if (!is.null(class)) variation <- class
  
  htmltools::tagList(htmltools::div(class = variation, htmltools::tags$input(id = id, type = "checkbox", checked = check), htmltools::tags$label(label, style = "color:white;")))
}
systats/shinyideas documentation built on June 4, 2020, 9:16 p.m.