diff --git a/R/tm_landing_popup.R b/R/tm_landing_popup.R index 9e8acc8dd..40c77efa2 100644 --- a/R/tm_landing_popup.R +++ b/R/tm_landing_popup.R @@ -12,7 +12,7 @@ #' app1 <- teal::init( #' data = teal.data::dataset("iris", iris), #' modules = teal::modules( -#' teal.modules.general::tm_front_page('A') +#' teal.modules.general::tm_front_page("A") #' ), #' extra_server = teal.modules.general::landing_popup( #' title = "Welcome", @@ -27,12 +27,12 @@ #' app2 <- teal::init( #' data = teal.data::dataset("iris", iris), #' modules = teal::modules( -#' teal.modules.general::tm_front_page('A') +#' teal.modules.general::tm_front_page("A") #' ), #' extra_server = teal.modules.general::landing_popup( #' title = "Welcome", #' content = div(tags$b("A place for the welcome message or a disclaimer statement.", style = "color: red;")), -#' buttons = tagList(modalButton("Proceed"), actionButton('close', 'Read more', onclick = "window.open('http://google.com', '_blank')")) +#' buttons = tagList(modalButton("Proceed"), actionButton("close", "Read more", onclick = "window.open('http://google.com', '_blank')")) #' ) #' ) #' @@ -40,12 +40,11 @@ #' shinyApp(app2$ui, app2$server) #' } #' -#' #' @export landing_popup <- function(title = NULL, content = NULL, buttons = modalButton("Accept")) { checkmate::assert_string(title, null.ok = TRUE) - checkmate::assert_multi_class(content, classes = c('character', 'shiny.tag', 'shiny.tag.list', 'html'), null.ok = TRUE) - checkmate::assert_multi_class(buttons, classes = c('shiny.tag', 'shiny.tag.list'), null.ok = TRUE) + checkmate::assert_multi_class(content, classes = c("character", "shiny.tag", "shiny.tag.list", "html"), null.ok = TRUE) + checkmate::assert_multi_class(buttons, classes = c("shiny.tag", "shiny.tag.list"), null.ok = TRUE) showModal( modalDialog(