fresh (version 0.1.0)

bs_vars_alert: Bootstrap CSS alert variables

Description

Those variables can be used to customize inputs in Bootstrap and Bootswatch themes.

Usage

bs_vars_alert(padding = NULL, border_radius = NULL,
  link_font_weight = NULL, success_text = NULL, success_bg = NULL,
  success_border = NULL, info_text = NULL, info_bg = NULL,
  info_border = NULL, warning_text = NULL, warning_bg = NULL,
  warning_border = NULL, danger_text = NULL, danger_bg = NULL,
  danger_border = NULL)

Arguments

padding

Padding for alerts.

border_radius

Border radius (rounded corners)

link_font_weight

Font weight for links in alerts.

success_text

Success text color.

success_bg

Success background color.

success_border

Success border color.

info_text

Info text color.

info_bg

Info background color.

info_border

Info border color.

warning_text

Warning text color.

warning_bg

Warning background color.

warning_border

Warning border color.

danger_text

Danger text color.

danger_bg

Danger background color.

danger_border

Danger border color.

Value

a list that can be used in create_theme.

Examples

Run this code
# NOT RUN {
bs_vars_alert(
  border_radius = "10px", # increase border radius,
  success_bg = "#c9d175" # change color for success alerts
)

if (interactive()) {
  library(shiny)

  ui <- fluidPage(
    use_theme(
      create_theme(
        theme = "default",
        bs_vars_alert(
          border_radius = "15px",
          success_bg = "forestgreen",
          success_text = "#FFF",
          danger_bg = "firebrick",
          danger_text = "#FFF"
        ),
        output_file = NULL
      )
    ),
    tags$br(),
    tags$div(
      class = "alert alert-success",
      "This is an alert !"
    ),
    tags$div(
      class = "alert alert-danger",
      "This is an other alert !"
    )
  )

  server <- function(input, output, session) {

  }

  shinyApp(ui, server)
}
# }

Run the code above in your browser using DataCamp Workspace