Skip to content

Commit

Permalink
awesome radio inline tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Mar 15, 2021
1 parent ab80bb9 commit f45530f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
50 changes: 25 additions & 25 deletions examples/bslib-awesome.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,43 +15,43 @@ ui <- fluidPage(
),
tags$h2("Checkbox"),
tags$hr(),
awesomeCheckbox("primary", "Pretty primary", value = TRUE, status = "primary"),
awesomeCheckbox("info", "Pretty info", value = TRUE, status = "info"),
awesomeCheckbox("success", "Pretty success", value = TRUE, status = "success"),
awesomeCheckbox("warning", "Pretty warning", value = TRUE, status = "warning"),
awesomeCheckbox("danger", "Pretty danger", value = TRUE, status = "danger"),
awesomeCheckbox("primary", "Awesome primary", value = TRUE, status = "primary"),
awesomeCheckbox("info", "Awesome info", value = TRUE, status = "info"),
awesomeCheckbox("success", "Awesome success", value = TRUE, status = "success"),
awesomeCheckbox("warning", "Awesome warning", value = TRUE, status = "warning"),
awesomeCheckbox("danger", "Awesome danger", value = TRUE, status = "danger"),

tags$h2("Checkbox group"),
tags$hr(),
awesomeCheckboxGroup("primary1", "Pretty primary", choices, choices, status = "primary"),
awesomeCheckboxGroup("info1", "Pretty info", choices, choices, status = "info"),
awesomeCheckboxGroup("success1", "Pretty success", choices, choices, status = "success"),
awesomeCheckboxGroup("warning1", "Pretty warning", choices, choices, status = "warning"),
awesomeCheckboxGroup("danger1", "Pretty danger", choices, choices, status = "danger"),
awesomeCheckboxGroup("primary1", "Awesome primary", choices, choices, status = "primary"),
awesomeCheckboxGroup("info1", "Awesome info", choices, choices, status = "info"),
awesomeCheckboxGroup("success1", "Awesome success", choices, choices, status = "success"),
awesomeCheckboxGroup("warning1", "Awesome warning", choices, choices, status = "warning"),
awesomeCheckboxGroup("danger1", "Awesome danger", choices, choices, status = "danger"),

tags$h2("Checkbox group (inline)"),
tags$hr(),
awesomeCheckboxGroup("primary2", "Pretty primary", choices, choices, status = "primary", inline = TRUE),
awesomeCheckboxGroup("info2", "Pretty info", choices, choices, status = "info", inline = TRUE),
awesomeCheckboxGroup("success2", "Pretty success", choices, choices, status = "success", inline = TRUE),
awesomeCheckboxGroup("warning2", "Pretty warning", choices, choices, status = "warning", inline = TRUE),
awesomeCheckboxGroup("danger2", "Pretty danger", choices, choices, status = "danger", inline = TRUE),
awesomeCheckboxGroup("primary2", "Awesome primary", choices, choices, status = "primary", inline = TRUE),
awesomeCheckboxGroup("info2", "Awesome info", choices, choices, status = "info", inline = TRUE),
awesomeCheckboxGroup("success2", "Awesome success", choices, choices, status = "success", inline = TRUE),
awesomeCheckboxGroup("warning2", "Awesome warning", choices, choices, status = "warning", inline = TRUE),
awesomeCheckboxGroup("danger2", "Awesome danger", choices, choices, status = "danger", inline = TRUE),

tags$h2("Radio Buttons"),
tags$hr(),
awesomeRadio("primary3", "Pretty primary", choices = choices, status = "primary"),
awesomeRadio("info3", "Pretty info", choices = choices, status = "info"),
awesomeRadio("success3", "Pretty success", choices = choices, status = "success"),
awesomeRadio("warning3", "Pretty warning", choices = choices, status = "warning"),
awesomeRadio("danger3", "Pretty danger", choices = choices, status = "danger"),
awesomeRadio("primary3", "Awesome primary", choices = choices, status = "primary"),
awesomeRadio("info3", "Awesome info", choices = choices, status = "info"),
awesomeRadio("success3", "Awesome success", choices = choices, status = "success"),
awesomeRadio("warning3", "Awesome warning", choices = choices, status = "warning"),
awesomeRadio("danger3", "Awesome danger", choices = choices, status = "danger"),

tags$h2("Radio Buttons (inline)"),
tags$hr(),
awesomeRadio("primary4", "Pretty primary", choices = choices, status = "primary", inline = TRUE),
awesomeRadio("info4", "Pretty info", choices = choices, status = "info", inline = TRUE),
awesomeRadio("success4", "Pretty success", choices = choices, status = "success", inline = TRUE),
awesomeRadio("warning4", "Pretty warning", choices = choices, status = "warning", inline = TRUE),
awesomeRadio("danger4", "Pretty danger", choices = choices, status = "danger", inline = TRUE)
awesomeRadio("primary4", "Awesome primary", choices = choices, status = "primary", inline = TRUE),
awesomeRadio("info4", "Awesome info", choices = choices, status = "info", inline = TRUE),
awesomeRadio("success4", "Awesome success", choices = choices, status = "success", inline = TRUE),
awesomeRadio("warning4", "Awesome warning", choices = choices, status = "warning", inline = TRUE),
awesomeRadio("danger4", "Awesome danger", choices = choices, status = "danger", inline = TRUE)
)

server <- function(input, output, session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ $awesome-label-inline-margin-left: 0 !default;
}

&.radio-inline{
display: inline-block;
margin-top: 0;
}
}
Expand Down

0 comments on commit f45530f

Please sign in to comment.