modalDialog_dsfr

modalDialog_dsfr(..., inputId = "fr-modal-1", title, footer = NULL)

Arguments

...

element a inclure dans le modal

inputId

inputId du modal

title

titre du modal

footer du modal

Valeur de retour

html

Examples

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)
}