R/mod_card_summary.R

Defines functions mod_card_summary_server mod_card_summary_ui

#' UI Card Summary
#' 
#' @param id The namespace identifier.
#' @noRd
#' 
mod_card_summary_ui <- function(id) {
  
  ns <- shiny::NS(id)
  
  shiny::uiOutput(ns("summary"))

}

#' Server Card Summary
#'
#' @param id The namespace identifier.
#' @param summary A summary of the company.
#' @noRd
#' 
mod_card_summary_server <- function(id, summary) {
  
  shiny::moduleServer(
    id,
    function(input, output, session) {

      output$summary <-
        shiny::renderUI(
          bs4Dash::box(
            width = 12,
            title = "Mission Statement",
            collapsible = FALSE,
            closable = FALSE,
            summary
          )
        )
    
    }
  )
  
}
James-G-Hill/SpaceX-R-Shiny-Application documentation built on Nov. 11, 2021, 11:26 p.m.