-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.R
76 lines (71 loc) · 1.73 KB
/
app.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
library(scoutbaR)
library(shiny)
library(bslib)
ui <- page_fillable(
title = "Penguins dashboard",
layout_sidebar(
sidebar = sidebar(
input_dark_mode(id = "theme"),
actionButton("update", "Update", icon = icon("house")),
scoutbar(
"scoutbar",
actions = list(
scout_section(
label = "Section 1",
scout_action(
id = 1,
icon = "house",
label = "1",
description = "1"
),
scout_action(
id = 2,
icon = "gear",
label = "2",
description = "2"
)
),
scout_section(
label = "Section 2",
scout_page(
label = "Page 1",
scout_action(
id = 3,
icon = "house",
label = "3",
description = "3"
),
scout_action(
id = 4,
icon = "gear",
label = "4",
description = "4"
)
),
scout_action(
id = 5,
icon = "gear",
label = "5",
description = "5"
)
)
)
),
textOutput("textOutput"),
textOutput("current_tab")
),
"Body"
)
)
server <- function(input, output, session) {
observeEvent(input$update, {
update_scoutbar(session, "scoutbar", list(revealScoutbar = TRUE))
})
observeEvent(input$theme, {
update_scoutbar(session, "scoutbar", list(theme = input$theme))
})
output$textOutput <- renderText({
sprintf("You entered: %s", input$scoutbar)
})
}
shinyApp(ui, server)