Open analytichealth opened 3 years ago
Thanks ! An argument was missing, re-install grom GitHub then try :
library(shiny)
library(shinypop)
library(htmltools)
ui <- fluidPage(
tags$h2("Alert with vex example"),
use_vex(),
actionButton("launch", "Launch an alert")
)
server <- function(input, output, session) {
observeEvent(input$launch, {
vex(
showCloseButton = FALSE,
showButton = FALSE,
escapeButtonCloses = FALSE,
overlayClosesOnClick = FALSE,
tags$div(
style = "text-align: center;",
tags$h3("Attention"),
tags$br(),
tags$p("You cannot close this alert, it will automatically disappear after 4 seconds.")
))
Sys.sleep(4)
vex_close()
})
}
shinyApp(ui, server)
Victor
Hi, very cool package.
I was expecting this example to not show a button (similar to easyClose = FALSE for a shiny::modalDialog). Please advise how I can remove the button.
Thank you