Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions R/useful-items.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,16 @@ bs4Badge <- function(..., color, position = c("left", "right"),
)
}

#' @title Bootstrap 4 Alert box
#'
#' @param style \code{(character)} Inline style parameters to add
#' @inherit bs4Dash::bs4Card params return
#' @export

bs4Alert <- function(..., status = "primary", style = NULL, id = NULL, width = 6) {
bs4Dash:::validateStatus(status)
shiny::tags$div(class = paste0("alert alert-",status), role = "alert", ..., style = paste0("margin: 6px 5px 6px 15px;", sapply(\(x) {ifelse(grepl(";$", x), x, paste0(x, ";"))}), id = id))
}


#' Bootstrap 4 accordion container
Expand Down