Skip to content

Commit

Permalink
updated bs_theme_esquisse()
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Nov 22, 2023
1 parent f84f5d5 commit ec336c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export(updateDropInput)
export(updatePalettePicker)
export(which_pal_scale)
import(ggplot2)
importFrom(bslib,bs_add_rules)
importFrom(bslib,bs_theme)
importFrom(datamods,filter_data_server)
importFrom(datamods,filter_data_ui)
importFrom(datamods,i18n)
Expand Down
26 changes: 18 additions & 8 deletions R/esquisser.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,8 @@ esquisser <- function(data = NULL,
app = esquisse_ui(
id = "esquisse",
container = function(...) {
theme <- bslib::bs_theme(version = 5L, primary = "#112446", secondary = "#cccccc")
theme <- bslib::bs_add_rules(
theme = theme,
c(
".modal-title { @extend .mt-0 }"
)
)
shiny::fillPage(
theme = theme,
theme = bs_theme_esquisse(),
...
)
},
Expand All @@ -102,3 +95,20 @@ esquisser <- function(data = NULL,
}


#' @importFrom bslib bs_theme bs_add_rules
bs_theme_esquisse <- function() {
theme <- bslib::bs_theme(
version = 5L,
primary = "#112446",
secondary = "#cccccc",
preset = "bootstrap",
font_scale = 0.8
)
bslib::bs_add_rules(
theme = theme,
c(
".modal-title { @extend .mt-0 }"
)
)
}

0 comments on commit ec336c1

Please sign in to comment.