Skip to content

Commit

Permalink
Update bs_global_theme() to prioritize preset argument (#896)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored Nov 6, 2023
1 parent 5c36528 commit b5bc3ab
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@

* In `layout_column_wrap()`, when `width` is a CSS unit -- e.g. `width = "400px"` or `width = "25%"` -- and `fixed_width = FALSE`, `layout_column_wrap()` will ensure that the columns are at least `width` wide, unless the parent container is narrower than `width`. (#851)

* `bs_global_theme()` gains a `preset` argument to match the function signature of `bs_theme()`. (#896)

## Bug fixes

* `toggle_switch()` now works correctly when called from within a Shiny module. `update_switch()` worked as expected, but `toggle_switch()` didn't apply the module's namespace to the `id` of the switch to be updated. (#769)
Expand Down
8 changes: 5 additions & 3 deletions R/bs-global.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#' @export
bs_global_theme <- function(
version = version_default(),
bootswatch = NULL,
preset = NULL,
bg = NULL,
fg = NULL,
primary = NULL,
Expand All @@ -46,11 +46,13 @@ bs_global_theme <- function(
base_font = NULL,
code_font = NULL,
heading_font = NULL,
...
...,
bootswatch = NULL
) {
bs_global_set(bs_theme(
version,
bootswatch,
preset = preset,
bootswatch = bootswatch,
bg = bg,
fg = fg,
primary = primary,
Expand Down
31 changes: 16 additions & 15 deletions man/bs_global_theme.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified man/figures/navset-card-pill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-card-underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-pill-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-pill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-tab-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/navset-underline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/page-navbar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b5bc3ab

Please sign in to comment.