R/mayo_loader.R

Defines functions mayo_loader

Documented in mayo_loader

#' A custom Mayo themed loading gif
#'
#' Add a loader that shows when an output element is calculating
#'
#' @param ui_element A UI element that should include a loader while the
#'     corresponding output is being calculated
#'
#' @export
mayo_loader <- function(ui_element) {
  shinycustomloader::withLoader(
    ui_element = ui_element,
    type = "image",
    loader = "mayoshinythemes/images/loader.gif")
}
mayoverse/mayoshiny documentation built on Aug. 13, 2021, 9:41 p.m.