Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ URL: https://github.com/quarto-dev/quarto-r,
BugReports: https://github.com/quarto-dev/quarto-r/issues
Depends:
R (>= 3.6)
Imports:
Imports:
bslib,
cli,
jsonlite,
later,
Expand Down
10 changes: 5 additions & 5 deletions R/theme.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ theme_colors_flextable <- function(bg, fg) {
#'
#' @export
theme_brand_flextable <- function(brand_yml) {
brand <- yaml::yaml.load_file(brand_yml)
brand <- attr(bslib::bs_theme(brand=brand_yml), "brand")
theme_colors_flextable(brand$color$background, brand$color$foreground)
}

Expand Down Expand Up @@ -62,7 +62,7 @@ theme_colors_ggplot <- function(bg, fg) {
#'
#' @export
theme_brand_ggplot <- function(brand_yml) {
brand <- yaml::yaml.load_file(brand_yml)
brand <- attr(bslib::bs_theme(brand=brand_yml), "brand")
theme_colors_ggplot(brand$color$background, brand$color$foreground)
}

Expand All @@ -84,7 +84,7 @@ theme_colors_gt <- function(bg, fg) {
#'
#' @export
theme_brand_gt <- function(brand_yml) {
brand <- yaml::yaml.load_file(brand_yml)
brand <- attr(bslib::bs_theme(brand=brand_yml), "brand")
theme_colors_gt(brand$color$background, brand$color$foreground)
}

Expand All @@ -106,7 +106,7 @@ theme_colors_plotly <- function(bg, fg) {
#'
#' @export
theme_brand_plotly <- function(brand_yml) {
brand <- yaml::yaml.load_file(brand_yml)
brand <- attr(bslib::bs_theme(brand=brand_yml), "brand")
theme_colors_plotly(brand$color$background, brand$color$foreground)
}

Expand All @@ -127,6 +127,6 @@ theme_colors_thematic <- function(bg, fg) {
#'
#' @export
theme_brand_thematic <- function(brand_yml) {
brand <- yaml::yaml.load_file(brand_yml)
brand <- attr(bslib::bs_theme(brand=brand_yml), "brand")
theme_colors_thematic(brand$color$background, brand$color$foreground)
}