Skip to content

Commit d54d2dd

Browse files
authored
fix(value_box): Restore full screen functionality (#699)
1 parent 9e47f70 commit d54d2dd

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

R/value-box.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,20 @@ value_box <- function(title, value, ..., showcase = NULL, showcase_layout = show
7171
fill = fill,
7272
!!!attribs,
7373
contents,
74-
as.card_item(component_dependency_css("value_box"))
74+
as.card_item(value_box_dependency())
7575
)
7676

7777
as_fragment(tag_require(res, version = 5, caller = "value_box()"))
7878
}
7979

80+
value_box_dependency <- function() {
81+
bs_dependency_defer(value_box_dependency_sass)
82+
}
83+
84+
value_box_dependency_sass <- function(theme) {
85+
component_dependency_sass(theme, "value_box")
86+
}
87+
8088
#' @param width one of the following:
8189
#' * A proportion (i.e., a number between 0 and 1) of available width to
8290
#' allocate to the showcase.

inst/components/dist/value_box/value_box.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inst/components/scss/value_box.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
}
6868
}
6969

70-
&.bslib-full-screen {
70+
&[data-full-screen="true"] {
7171
.value-box-grid {
7272
grid-template-columns: var(--bslib-value-box-widths-full-screen);
7373
}
@@ -76,7 +76,7 @@
7676
}
7777
}
7878

79-
&:not(.bslib-full-screen) {
79+
&:not([data-full-screen="true"]) {
8080
.value-box-showcase.showcase-top-right {
8181
margin-top: 0;
8282
}

0 commit comments

Comments
 (0)