[英]How can I change the text size in Shiny modals?
我通過編輯 css 文件成功地更改了閃亮的儀表板界面中的文本大小。
或者我使用以下結構:
div(DTOutput(outputId = "table"), style = "font-size:85%"))
但是,我找不到閃亮模態的節點名稱。 是否可以通過 .css 更改閃亮模式中的文本大小?
你在尋找這樣的東西嗎?
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
observeEvent(input$show, {
showModal(modalDialog(
title = "Important message",
div("This is an important message!", style="font-size:160%")
))
})
}
)
ModalDialog
將 UI 元素作為其第一個參數。 這似乎與其他閃亮元素所接受的論點相同。 比較例如: ?siderbarPanel
和?modalDialog
。 因此,如果您可以在應用程序主體中執行此操作,則可能可以在模態中執行此操作。
例如,我在模態中插入了側邊欄布局:
shinyApp(
ui = basicPage(
actionButton("show", "Show modal dialog")
),
server = function(input, output) {
observeEvent(input$show, {
showModal(modalDialog(
sidebarLayout(sidebarPanel("yeah"),mainPanel("cool"))
))
})
}
)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.