23 lines
546 B
R
23 lines
546 B
R
|
|
#' Displays a shiny notification with MNR specific settings
|
|
#'
|
|
#' @inheritParams shiny::showNotification
|
|
#' @param message Character string to display in the notification
|
|
#'
|
|
#' @export
|
|
mnrNotification <- function(
|
|
message, type = "message", session = shiny::getDefaultReactiveDomain()
|
|
) {
|
|
shiny::showNotification(
|
|
message,
|
|
type = type,
|
|
duration = ifelse(
|
|
type %in% c("warning", "error"),
|
|
getOption("mnr.error_duration", 30),
|
|
getOption("mnr.notify_duration", 15)
|
|
),
|
|
closeButton = TRUE,
|
|
session = session
|
|
)
|
|
}
|