Skip to content

Commit 4b1350d

Browse files
authored
feat(sidebar): Use private properties to set local values (#865)
1 parent 3989827 commit 4b1350d

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

R/sidebar.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ layout_sidebar <- function(
210210
abort("`border` must be `NULL`, `TRUE`, or `FALSE`")
211211
}
212212
if (!(is.null(border_radius) || isTRUE(border_radius) || isFALSE(border_radius))) {
213-
abort("`border`_radius must be `NULL`, `TRUE`, or `FALSE`")
213+
abort("`border_radius` must be `NULL`, `TRUE`, or `FALSE`")
214214
}
215215

216216
# main content area colors, if not provided ----
@@ -249,14 +249,14 @@ layout_sidebar <- function(
249249
`data-bslib-sidebar-border` = if (!is.null(border)) tolower(border),
250250
`data-bslib-sidebar-border-radius` = if (!is.null(border_radius)) tolower(border_radius),
251251
style = css(
252-
"--bslib-sidebar-width" = sidebar$width,
253-
"--bslib-sidebar-bg" = sidebar$color$bg,
254-
"--bslib-sidebar-fg" = sidebar$color$fg,
255-
"--bslib-sidebar-main-fg" = fg,
256-
"--bslib-sidebar-main-bg" = bg,
252+
"--_sidebar-width" = sidebar$width,
253+
"--_sidebar-bg" = sidebar$color$bg,
254+
"--_sidebar-fg" = sidebar$color$fg,
255+
"--_main-fg" = fg,
256+
"--_main-bg" = bg,
257257
"--bs-card-border-color" = border_color,
258258
height = validateCssUnit(height),
259-
"--bslib-sidebar-max-height-mobile" = max_height_mobile
259+
"--_max-height-mobile" = max_height_mobile
260260
),
261261
!!!contents,
262262
sidebar_init_js(),

0 commit comments

Comments
 (0)