-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.R
67 lines (59 loc) · 1.99 KB
/
test.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
# library(shiny)
# library(shinyBS)
#
# title_html <- "<em>Tooltip</em> <u>with</u> <b>HTML</b>"
#
# shinyApp(
# ui = navbarPage(
# # bsTooltip(id = "someInput", title = "This is an input",
# # placement = "left", trigger = "hover"),
# tags$script(HTML('
# $( document ).on("shiny:sessioninitialized", function(event) {
# $(\'span[data-toggle="tooltip"]\').tooltip({
# html: true
# });
# });'
# )),
#
# tabsetPanel(
# tabPanel(span("Tab 1", title = title_html,`data-toggle`="tooltip", `data-placement` ="bottom")),
# tabPanel(span("Tab 2",title="bbb",`data-toggle`="tooltip")),
# tabPanel(span("Tab 3",title="ccc",`data-toggle`="tooltip"))
# )
# ),
#
# server = function(input, output) {
# # addTooltip(id = "someInput", title = "This is an input.",
# # placement = "left", trigger = "hover")
# }
# )
library(shiny)
library(shinydashboard)
library(shinyWidgets)
ui <- dashboardPage(
dashboardHeader( title = "app",
tags$li(class = "dropdown",
dropMenu(
dropdownButton("Info", status = 'success', icon = icon('info')),
h3(strong('Information')),
br(),
h5('This is really helpful'),
textInput('text', 'You can also put UI elements here'),
placement = "bottom",
arrow = TRUE)
)
)
,
dashboardSidebar(),
dashboardBody(actionButton('help', 'Help'))
)
server <- function(input, output) {
observeEvent(input$help,{
showModal(modalDialog(
title = "Help!",
"Information",
textInput('text2', 'You can also put UI elements here')
))
})
}
shinyApp(ui, server)