Pārlūkot izejas kodu

Tweak bulma_level

master
Garrick Aden-Buie pirms 7 gadiem
vecāks
revīzija
59e110c1df
3 mainītis faili ar 37 papildinājumiem un 5 dzēšanām
  1. +9
    -5
      R/layout_level.R
  2. +16
    -0
      man/bulma_level.Rd
  3. +12
    -0
      man/level_item_header.Rd

+ 9
- 5
R/layout_level.R Parādīt failu

@@ -8,23 +8,27 @@ bulma_level <- function(
left = NULL,
right = NULL,
is_mobile = TRUE,
style = "item"
style = c("item", "header"),
container_tag = c("div", "nav")
) {
level_item_f <- switch(
match.arg(style, c("item", "header")),
match.arg(style),
item = level_item,
header = level_item_header
)
htmltools::tags$div(
tag_f <- tag_function(container_tag)
x <- tag_f(
class = paste("level", if (is_mobile) "is-mobile"),
level_side(left),
level_item_f(...),
level_side(right)
)

x
}

level_item <- function(...) {
x <- apply_tag(..., tag = "div", class = "level-item")
x <- apply_tag(dots2list(...), tag = "div", class = "level-item")
tagList(x)
}

@@ -41,7 +45,7 @@ level_side <- function(x, side = "left") {

#' @title Bulma Level Items With Headers
level_item_header <- function(..., item_class = "has-text-centered", heading_class = NULL, title_class = NULL) {
items <- list(...)
items <- dots2list(...)
x <- mapply(level_item_header_, names(items), items,
MoreArgs = list(item_class = item_class,
heading_class = heading_class,

+ 16
- 0
man/bulma_level.Rd Parādīt failu

@@ -0,0 +1,16 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout_level.R
\name{bulma_level}
\alias{bulma_level}
\title{Bulma Level}
\usage{
bulma_level(..., left = NULL, right = NULL, is_mobile = TRUE,
style = c("item", "header"), container_tag = c("div", "nav"))
}
\description{
Bulma Level
}
\examples{
bulma_level("Home", "Menu", "Bulma", "Reservations", "Contact")
bulma_level("Tweets" = 3456, Following = 123, Followers = "456K", Likes = 789, style = "header")
}

+ 12
- 0
man/level_item_header.Rd Parādīt failu

@@ -0,0 +1,12 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout_level.R
\name{level_item_header}
\alias{level_item_header}
\title{Bulma Level Items With Headers}
\usage{
level_item_header(..., item_class = "has-text-centered",
heading_class = NULL, title_class = NULL)
}
\description{
Bulma Level Items With Headers
}

Notiek ielāde…
Atcelt
Saglabāt