R/plotly_ui.R

Defines functions plotly_ui

Documented in plotly_ui

#' Plotly UI
#'
#' @param id Module ID
#' @param button_text A string
#'
#' @export
plotly_ui <- function(
  id,
  button_text = "Download plot table"
){

  ns <- shiny::NS(id)

  shiny::tagList(
    shiny::conditionalPanel(
      condition =  "output.show_group_text",
      shiny::textOutput(ns("plot_group_text")),
      ns = ns
    ),
    shiny::downloadButton(ns("download_tbl"), button_text)
  )
}
CRI-iAtlas/iatlas.modules documentation built on Aug. 8, 2024, 12:53 a.m.