R/theme.R

Defines functions theme_dark theme_light theme_info theme_warning theme_danger theme_success theme_secondary theme_primary

Documented in theme_danger theme_dark theme_info theme_light theme_primary theme_secondary theme_success theme_warning

#' Theme colors
#'
#' Theme color functions.
#'
#' @returns A character string.
#'
#' @export
#'
#' @examples
#'
#' library(htmltools)
#'
#' div(
#'   .style %>%
#'     background_color("primary")
#' )
#'
#' div(
#'   .style %>%
#'     background_color(theme_primary())
#' )
#'
theme_primary <- function() {
  "primary"
}

#' @rdname theme_primary
#' @export
theme_secondary <- function() {
  "secondary"
}

#' @rdname theme_primary
#' @export
theme_success <- function() {
  "success"
}

#' @rdname theme_primary
#' @export
theme_danger <- function() {
  "danger"
}

#' @rdname theme_primary
#' @export
theme_warning <- function() {
  "warning"
}

#' @rdname theme_primary
#' @export
theme_info <- function() {
  "info"
}

#' @rdname theme_primary
#' @export
theme_light <- function() {
  "light"
}

#' @rdname theme_primary
#' @export
theme_dark <- function() {
  "dark"
}

Try the cascadess package in your browser

Any scripts or data that you put into this service are public.

cascadess documentation built on Oct. 30, 2024, 9:29 a.m.