R/utils_ui.R

Defines functions notify

Documented in notify

#' @title
#' Show notification
#'
#' @description
#' Function showing a notification message on the bottom right of the User Interface
#'
#' @details
#' * [Shiiny notifications](https://shiny.rstudio.com/articles/notifications.html)
#'
#' @param msg notification text message to be displayed
#' @param id internal notification id
#' @param duration duration of notification message in seconds.
#'
#' @export
notify <- function(msg, id = NULL, duration = NULL) {
  shiny::showNotification(msg, id = id, duration = duration,
                          closeButton = FALSE, type = "message")
}
gcfrench/shinystore documentation built on July 6, 2022, 4:13 p.m.