Creates a br-magic-button, a floating action button. Behaves
like a Shiny action button: the server observes input$<inputId>
to count clicks.
Usage
br_magic_button(
inputId,
label,
size = c("medium", "small", "large"),
icon = NULL
)Examples
if (interactive()) {
ui <- shiny::fluidPage(
use_govbr(),
shinyGovBRstyle::br_layout(
shinyGovBRstyle::br_magic_button("novo", "Adicionar",
icon = "fas fa-cart-plus")
)
)
server <- function(input, output, session) {
shiny::observeEvent(input$novo, shiny::showNotification("Clicou!"))
}
shinyApp(ui = ui, server = server)
}
