-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathalert.R
51 lines (41 loc) · 1.03 KB
/
alert.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Alerts ---------------------------------
library(shiny)
library(shinyWidgets)
ui <- fluidPage(
# Try with different Bootstrap version
# theme = bslib::bs_theme(version = 5),
tags$h2("Alerts"),
fluidRow(
column(
width = 6,
alert(
status = "success",
tags$b("Well done!"), "You successfully read this important alert message."
),
alert(
status = "info",
tags$b("Heads up!"), "This alert needs your attention, but it's not super important."
),
alert(
status = "info",
dismissible = TRUE,
tags$b("Dismissable"), "You can close this one."
)
),
column(
width = 6,
alert(
status = "warning",
tags$b("Warning!"), "Better check yourself, you're not looking too good."
),
alert(
status = "danger",
tags$b("Oh snap!"), "Change a few things up and try submitting again."
)
)
)
)
server <- function(input, output, session) {
}
if (interactive())
shinyApp(ui, server)