A continuación, se muestra un código que muestra que el tamaño de una alerta dulce cuando se usa bootstrap es muy grande. Si comenta el fragmento de código navbarpage() que observo en el ejemplo a continuación, la alerta dulce es más pequeña.
Supongo que podría sobrescribir con un nuevo .css, lo cual está bien. Pero, ¿existe una forma alternativa de lidiar con eso a través de argumentos en la función misma? No veo un argumento en la ayuda, pero está el ... que pasa a .js. No soy lo suficientemente inteligente con js para saber si esa es una opción y, de ser así, ¿cómo se vería?
gracias por cualquier sugerencia
library(shiny) library(bslib) library(shinyBS) ui <- fluidPage( ### Code Chunk to comment out navbarPage( theme = bs_theme(bootswatch = "flatly", version = 4), title = 'Methods', tabPanel('One'), ), ### end BS code chunk tags$h2("Sweet Alert examples"), actionButton( inputId = "success", label = "Launch a success sweet alert", icon = icon("check") ), actionButton( inputId = "error", label = "Launch an error sweet alert", icon = icon("remove") ), actionButton( inputId = "sw_html", label = "Sweet alert with HTML", icon = icon("thumbs-up") ) ) server <- function(input, output, session) { observeEvent(input$success, { sendSweetAlert( title = "Success !!", text = "All in order", type = "success" ) }) observeEvent(input$error, { sendSweetAlert( title = "Error !!", text = "It's broken...", type = "error" ) }) observeEvent(input$sw_html, { sendSweetAlert( title = NULL, text = tags$span( tags$h3("With HTML tags", style = "color: steelblue;"), "In", tags$b("bold"), "and", tags$em("italic"), tags$br(), "and", tags$br(), "line", tags$br(), "breaks", tags$br(), "and an icon", icon("thumbs-up") ), html = TRUE ) }) } shinyApp(ui, server)