R/utils.R

Defines functions getJavaScriptOutputId getJavaScriptInputId inputLabel

#' @importFrom glue glue

getJavaScriptOutputId <- function(id, ns) {
  glue("output['{ns(id)}']")
}

getJavaScriptInputId <- function(id, ns) {
  glue("input['{ns(id)}']")
}

inputLabel <- function(label) {
  if (!is.null(label)) {
    div(
      tags$strong(label),
      style = "padding-bottom: 5px;"
    )
  }
}
keqiang/shinywidgets documentation built on March 3, 2020, 11:56 p.m.