modalDialog_dsfr.Rd
modalDialog_dsfr
modalDialog_dsfr(..., inputId = "fr-modal-1", title, footer = NULL)
html
if (interactive()) {
library(shiny)
ui <- fluidPage_dsfr(
actionButton_dsfr("show", "Show modal dialog")
)
server <- function(input, output, session) {
observeEvent(input$show, {
showModal_dsfr(
ui = modalDialog_dsfr(
tagList(
htmltools::div("Le corps du texte"),
actionButton_dsfr(
inputId = "btn",
label = "txt"
)
),
title = "Titre du modal",
footer = "Footer du modal"
)
)
})
observe({
print(input$btn)
})
}
shinyApp(ui, server)
}