Skip to content

Commit

Permalink
Update f7Grid.R
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasChln authored Nov 20, 2024
1 parent db8fa86 commit c9075e0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/f7Grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,17 @@
#' @param ... Row content.
#' @param cols Columns number. Numeric between 1 and 20.
#' @param gap Whether to display gap between columns. TRUE by default.
#' @param medium_cols Columns number for large screens. Numeric between 1 and 20.
#'
#' @author David Granjon, \email{dgranjon@@ymail.com}
#' @export
f7Grid <- function(..., cols, gap = TRUE) {
f7Grid <- function(..., cols, gap = TRUE, medium_cols = NULL) {
cl <- sprintf("grid grid-cols-%s", cols)

if (!is.null(medium_cols)) {
cl <- paste(cl, sprintf("medium-grid-cols-%s", medium_cols))
}

if (gap) cl <- paste(cl, "grid-gap")
shiny::tags$div(class = cl, ...)
}

0 comments on commit c9075e0

Please sign in to comment.