Skip to content

Commit ada4f6e

Browse files
committed
fix: add style to bs4_spinner
1 parent 773b9cc commit ada4f6e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

R/spinners.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ spin_6 <- function(){
744744
#' @rdname spinners
745745
#' @export
746746
bs4_spinner <- function(
747+
style = c("spin", "grow"),
747748
color = c(
748749
"primary",
749750
"secondary",
@@ -755,9 +756,15 @@ bs4_spinner <- function(
755756
"dark"
756757
)
757758
) {
759+
style <- match.arg(style)
758760
color <- match.arg(color)
761+
762+
cl <- "border"
763+
if(style == "grow")
764+
cl <- "grow"
765+
759766
tags$div(
760-
class = sprintf("spinner-border text-%s", color),
767+
class = sprintf("spinner-%s text-%s", cl, color),
761768
role = "status",
762769
tags$span(
763770
class = "sr-only",

man/spinners.Rd

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

0 commit comments

Comments
 (0)