【问题标题】:Widen notification popup in R Shiny?在 R Shiny 中扩大通知弹出窗口?
【发布时间】:2021-06-07 13:14:07
【问题描述】:

如何在 R Shiny 中扩大通知范围?现在它正在切断更长的错误消息。

library(shiny)

ui <- fluidPage(
  actionButton("test", "Test")
)

server <- function(input, output, session) {
  observeEvent(input$test, {
      showNotification("You did it! Now make me wider", type = "message")
  })
}

shinyApp(ui, server)

【问题讨论】:

    标签: css r user-interface shiny


    【解决方案1】:

    CSS 调整闪亮通知的宽度

    /* Put shiny notifications front and center */
    #shiny-notification-panel {
      top: 0;
      bottom: unset;
      left: 0;
      right: 0;
      margin-left: auto;
      margin-right: auto;
      width: 100%;
      max-width: 450px;
    }
    

    【讨论】:

      猜你喜欢
      • 2021-05-19
      • 2020-09-29
      • 1970-01-01
      • 2015-11-20
      • 1970-01-01
      • 2014-08-19
      • 2019-09-07
      • 2019-10-14
      • 1970-01-01
      相关资源
      最近更新 更多