-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvalueBox.R
65 lines (54 loc) · 3.1 KB
/
valueBox.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
library(shiny)
library(shinyWidgets)
logo <- tags$a(href = "https://www.google.com", target = "_blank",
tags$img(src = "logohere.png", height = '50', width = '50'),
span('example', style = "color:white"))
ui <- dashboardPage(
dashboardHeader(title = logo),
dashboardSidebar(),
dashboardBody(
# CSS
tags$head(tags$style(HTML('
/* value box customize */
.small-box.bg-yellow { background-color: #EC9787 !important; color: #000000 !important; height:300px}
.small-box.bg-olive { background-color: #B4B7BA !important; color: #000000 !important; height:300px}
.small-box.bg-orange { background-color: #3F69AA !important; color: #000000 !important; height:300px}
/* value box buttons customize */
#clvaluebox { float:right; width:35%;}
#pdvaluebox { float:right; width:35%;}
#atvaluebox { float:right; width:35%;}
'))),
fluidRow(
box(title = "Title 1", status = "primary", width = 12, solidHeader = TRUE, "You can enter your text here", br(), br(),
actionButton(inputId='ab1', label="Learn More", icon = icon("th"), onclick ="window.open('http://www.chop.edu/doctors/maris-john-m#.V172uOYrLVo', '_blank')"))
),
fluidRow(
valueBox(h4(tags$b("Box 1"), actionBttn(inputId = "clvaluebox",
label = "How to use",
style = "unite",
color = "warning",
icon = icon("question"),
size = "xs"), hr()),
color = "yellow", p("This is box 1")
),
valueBox(h4(tags$b("Box 2"), actionBttn(inputId = "pdvaluebox",
label = "How to use",
style = "unite",
color = "warning",
icon = icon("question"),
size = "xs"),hr()),
color = "olive", p("This is box 2")
),
valueBox(h4(tags$b("Box 3"), actionBttn(inputId = "atvaluebox",
label = "How to use",
style = "unite",
color = "warning",
icon = icon("question"),
size = "xs"), hr()),
color = "orange", p("This is box 3")
) # end of value box
)
)
)
shinyApp(ui, server = function(input, output, session) {
})