R/ui.R

Defines functions ui_value ui_done ui_oops ui_line bullet

### very simplified versions of usethis functions
bullet <- function(x, bullet) {
  bullet <- paste0(bullet, " ", x)
  rlang::inform(bullet)
}

ui_line <- function(x) {
  rlang::inform(x)
}

ui_oops <- function(x) {
  bullet(x, crayon::red(clisymbols::symbol$cross))
}

ui_done <- function(x) {
  bullet(x, crayon::green(clisymbols::symbol$tick))
}

ui_value <- function(x) {
  if (is.character(x)) {
    x <- encodeString(x, quote = "'")
  }
  x <- crayon::blue(x)
  x
}

Try the dbflobr package in your browser

Any scripts or data that you put into this service are public.

dbflobr documentation built on Aug. 20, 2022, 1:06 a.m.