Garrick Aden-Buie 7 лет назад
Родитель
Сommit
59e110c1df
3 измененных файлов: 37 добавлений и 5 удалений
  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 Просмотреть файл

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

x
} }


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




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

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

% 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 Просмотреть файл

% 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
}

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