if (interactive()) {
library(shiny)
library(shinyMobile)
shinyApp(
ui = f7Page(
title = "Simple Dialog",
f7SingleLayout(
navbar = f7Navbar(title = "f7Dialog"),
f7Button(inputId = "goButton", "Go!"),
f7Button(inputId = "update", "Update config")
)
),
server = function(input, output, session) {
observeEvent(input$goButton,{
f7Dialog(
title = "Dialog title",
text = "This is an alert dialog"
)
})
observeEvent(input$update,{
updateF7App(
options = list(
dialog = list(
buttonOk = "Yeaaaah!",
buttonCancel = "Ouuups!"
)
)
)
f7Dialog(
id = "test",
title = "Warning",
type = "confirm",
text = "Look at me, I have a new buttons!"
)
})
}
)
}
Run the code above in your browser using DataLab