diff --git a/NEWS.md b/NEWS.md index 4176e25..5c69a4f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,5 @@ # argonR 0.2.0.9000 +- add offset arg to `argonColumn()` - Add btn_text argument to `argonCard()` - Fix #1: headroom.js and add the corresponding argument to `argonNavbar()` - Fix #7 introduced with #4 diff --git a/R/argonColumn.R b/R/argonColumn.R index c13c6c8..9c070af 100644 --- a/R/argonColumn.R +++ b/R/argonColumn.R @@ -5,6 +5,7 @@ #' @param ... Any UI element. #' @param width Optional. Column width between 1 and 12. #' @param center Whether to center column elements or not. FALSE by default. +#' @param offset Column offset. NULL by default. Importantly, offset + width cannot exceed 12! #' #' @examples #' if (interactive()) { @@ -24,10 +25,10 @@ #' @author David Granjon, \email{dgranjon@@ymail.com} #' #' @export -argonColumn <- function(..., width = NULL, center = FALSE) { - - colCl <- if(!is.null(width)) paste0("col-sm-", width) else "col-sm" +argonColumn <- function (..., width = NULL, center = FALSE, offset = NULL) { + colCl <- "col-sm" + if (!is.null(width)) colCl <- paste0(colCl, " col-sm-", width) + if (!is.null(offset)) colCl <- paste0(colCl, " offset-sm-", offset) if (center) colCl <- paste0(colCl, " text-center") - htmltools::tags$div(class = colCl, ...) } \ No newline at end of file diff --git a/docs/articles/getting_started.html b/docs/articles/getting_started.html index 14d54e0..5d82d00 100644 --- a/docs/articles/getting_started.html +++ b/docs/articles/getting_started.html @@ -96,7 +96,7 @@

Getting Started

David Granjon

-

2019-05-02

+

2019-06-04

Source: vignettes/getting_started.Rmd diff --git a/docs/news/index.html b/docs/news/index.html index 2af653c..db6f0dc 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -133,6 +133,8 @@

argonR 0.2.0.9000 Unreleased