Rename argument from 'html' to 'ui'

This commit is contained in:
Winston Chang
2016-03-22 14:47:07 -05:00
parent c18f3e86f0
commit 898f7b66cf
2 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
#'
#' These functions show and remove notifications in a Shiny application.
#'
#' @param html HTML content of message.
#' @param ui Content of message.
#' @param duration Number of seconds to display the message before it
#' disappears. Use \code{NULL} to make the message not automatically
#' disappear.
@@ -59,7 +59,7 @@
#' )
#' }
#' @export
showNotification <- function(html, duration = 5, closeButton = TRUE,
showNotification <- function(ui, duration = 5, closeButton = TRUE,
id = NULL, session = getDefaultReactiveDomain()) {
if (is.null(id))
@@ -67,7 +67,7 @@ showNotification <- function(html, duration = 5, closeButton = TRUE,
session$sendNotification("show",
list(
html = as.character(htmltools::as.tags(html)),
html = as.character(htmltools::as.tags(ui)),
duration = if (!is.null(duration)) duration * 1000,
closeButton = closeButton,
id = id

View File

@@ -5,13 +5,13 @@
\alias{showNotification}
\title{Show or remove a notification}
\usage{
showNotification(html, duration = 5, closeButton = TRUE, id = NULL,
showNotification(ui, duration = 5, closeButton = TRUE, id = NULL,
session = getDefaultReactiveDomain())
removeNotification(id = NULL, session = getDefaultReactiveDomain())
}
\arguments{
\item{html}{HTML content of message.}
\item{ui}{Content of message.}
\item{duration}{Number of seconds to display the message before it
disappears. Use \code{NULL} to make the message not automatically