Просмотр исходного кода

Tag bulma modifiers functions

master
Garrick Aden-Buie 7 лет назад
Родитель
Сommit
b3fd8b3726
8 измененных файлов: 34 добавлений и 0 удалений
  1. +9
    -0
      R/modifiers.R
  2. +3
    -0
      man/bulma_color.Rd
  3. +5
    -0
      man/bulma_helper.Rd
  4. +5
    -0
      man/bulma_modifier.Rd
  5. +3
    -0
      man/bulma_responsive.Rd
  6. +3
    -0
      man/bulma_responsive_alignment.Rd
  7. +3
    -0
      man/bulma_responsive_size.Rd
  8. +3
    -0
      man/bulma_typography.Rd

+ 9
- 0
R/modifiers.R Просмотреть файл

@@ -11,6 +11,8 @@
#' @examples
#' bulma_modifier(color = "primary", size = "large", state = "outlined")
#' @references https://bulma.io/documentation/modifiers/syntax/
#' @seealso Bulma modifiers
#' @return String of modifier classes
#' @export
bulma_modifier <- function(color = NULL, size = NULL, state = NULL) {
color <- validate_value(color,
@@ -51,6 +53,8 @@ bulma_modifier <- function(color = NULL, size = NULL, state = NULL) {
#' bulma_helper(spacing = c("marginless", "paddingless"))
#' bulma_helper(other = "clipped", float = "pulled-right")
#' @references https://bulma.io/documentation/modifiers/helpers
#' @seealso Bulma modifiers
#' @return String of modifier classes
#' @export
bulma_helper <- function(float = NULL, spacing = NULL, other = NULL) {
float <- validate_value(float, c("clearfix", "pulled-left", "pulled-right"), FALSE, "float")
@@ -76,6 +80,7 @@ bulma_helper <- function(float = NULL, spacing = NULL, other = NULL) {
#' bulma_responsive("flex", "widescreen", only = TRUE)
#' @references https://bulma.io/documentation/modifiers/responsive-helpers/
#' @return A string of helper classes
#' @seealso Bulma modifiers
#' @export
bulma_responsive <- function(display = NULL, viewport = NULL, only = FALSE) {
display <- validate_value(display, c(
@@ -108,6 +113,7 @@ validate_viewport <- function(viewport, var_name = "viewport") {
#'
#' @references https://bulma.io/documentation/modifiers/color-helpers
#' @return String of modifer classes
#' @seealso Bulma modifiers
#' @export
bulma_color <- function(text = NULL, background = NULL) {
text <- validate_color(text, "text")
@@ -142,6 +148,7 @@ validate_color <- function(color, var_name = "text", prefix = paste0(var_name, "
#'
#' @references https://bulma.io/documentation/modifiers/typography-helpers/
#' @return String of modifer classes
#' @seealso Bulma modifiers
#' @export
bulma_typography <- function(
size = NULL,
@@ -196,6 +203,7 @@ validate_alignment <- function(alignment, var_name = "alignment", prefix = "text
#' bulma_responsive_size(2, "tablet")
#' bulma_responsive_size(viewport = "widescreen")
#' @return String of modifier classes
#' @seealso Bulma modifiers
#' @export
bulma_responsive_size <- function(size = "1", viewport = "desktop") {
# TODO: Needs to be vectorized, matching size/viewport arguments
@@ -226,6 +234,7 @@ use_bulma_responsive <- function(x, var, varname) {
#' bulma_responsive_alignment(viewport = "widescreen")
#' @return String of modifier classes
#' @references https://bulma.io/documentation/modifiers/typography-helpers/#responsive-alignment
#' @seealso Bulma modifiers
#' @export
bulma_responsive_alignment <- function(alignment = "left", viewport = "desktop") {
# TODO: Needs to be vectorized, matching alignment/viewport arguments

+ 3
- 0
man/bulma_color.Rd Просмотреть файл

@@ -31,3 +31,6 @@ bulma_color("white", "primary")
\references{
https://bulma.io/documentation/modifiers/color-helpers
}
\seealso{
Bulma modifiers
}

+ 5
- 0
man/bulma_helper.Rd Просмотреть файл

@@ -32,6 +32,8 @@ bulma_helper(float = NULL, spacing = NULL, other = NULL)
}
\value{
String of modifer classes

String of modifier classes
}
\description{
Bulma Helper Classes
@@ -44,3 +46,6 @@ bulma_helper(other = "clipped", float = "pulled-right")
\references{
https://bulma.io/documentation/modifiers/helpers
}
\seealso{
Bulma modifiers
}

+ 5
- 0
man/bulma_modifier.Rd Просмотреть файл

@@ -15,6 +15,8 @@ bulma_modifier(color = NULL, size = NULL, state = NULL)
}
\value{
String of modifer classes

String of modifier classes
}
\description{
Bulma Modifier Classes
@@ -25,3 +27,6 @@ bulma_modifier(color = "primary", size = "large", state = "outlined")
\references{
https://bulma.io/documentation/modifiers/syntax/
}
\seealso{
Bulma modifiers
}

+ 3
- 0
man/bulma_responsive.Rd Просмотреть файл

@@ -26,3 +26,6 @@ bulma_responsive("flex", "widescreen", only = TRUE)
\references{
https://bulma.io/documentation/modifiers/responsive-helpers/
}
\seealso{
Bulma modifiers
}

+ 3
- 0
man/bulma_responsive_alignment.Rd Просмотреть файл

@@ -27,3 +27,6 @@ bulma_responsive_alignment(viewport = "widescreen")
\references{
https://bulma.io/documentation/modifiers/typography-helpers/#responsive-alignment
}
\seealso{
Bulma modifiers
}

+ 3
- 0
man/bulma_responsive_size.Rd Просмотреть файл

@@ -24,3 +24,6 @@ bulma_responsive_size()
bulma_responsive_size(2, "tablet")
bulma_responsive_size(viewport = "widescreen")
}
\seealso{
Bulma modifiers
}

+ 3
- 0
man/bulma_typography.Rd Просмотреть файл

@@ -41,3 +41,6 @@ bulma_color("white", "primary")
\references{
https://bulma.io/documentation/modifiers/typography-helpers/
}
\seealso{
Bulma modifiers
}

Загрузка…
Отмена
Сохранить