revdep/library.noindex/baker/new/bslib/examples/build-a-box/R/shuffleButton.R

iconButton <- function(
  id,
  label,
  class = NULL,
  icon = "shuffle",
  icon_title = "Random",
  ...
) {
  tags$button(
    id = id,
    class = "btn btn-default action-button",
    class = class,
    bsicons::bs_icon("shuffle", title = "Random"),
    label
  )
}

shuffleButton <- function(id, label, class = NULL) {
  iconButton(id, label, class = c("shuffle-button", class))
}
zhenkewu/baker documentation built on May 6, 2024, 11:19 p.m.