Kaynağa Gözat

fa_icon() make as_html second arg

master
Garrick Aden-Buie 7 yıl önce
ebeveyn
işleme
402f313398
2 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. +2
    -2
      R/utils.R
  2. +3
    -3
      man/fa_icon.Rd

+ 2
- 2
R/utils.R Dosyayı Görüntüle

@@ -96,8 +96,8 @@ str_trim <- function(x) {
#'
#' Create the correct Font Awesome class.
#' @param name Name of the Font Awesome icon
#' @param solid Should the solid or the regular icon be used?
#' @param as_html If `FALSE` (default), only the icon class is returned.
#' @param solid Should the solid or the regular icon be used?
#' @examples
#' fa_icon("github")
#' fa_icon("star")
@@ -105,7 +105,7 @@ str_trim <- function(x) {
#'
#' @references <https://fontawesome.com/icons>
#' @export
fa_icon <- function(name, solid = TRUE, as_html = FALSE) {
fa_icon <- function(name, as_html = FALSE, solid = TRUE) {
iconClass <- if (name %in% font_awesome_brands) "fab" else {
if (solid) "fas" else "far"
}

+ 3
- 3
man/fa_icon.Rd Dosyayı Görüntüle

@@ -4,14 +4,14 @@
\alias{fa_icon}
\title{Font Awesome Icon}
\usage{
fa_icon(name, solid = TRUE, as_html = FALSE)
fa_icon(name, as_html = FALSE, solid = TRUE)
}
\arguments{
\item{name}{Name of the Font Awesome icon}

\item{solid}{Should the solid or the regular icon be used?}

\item{as_html}{If \code{FALSE} (default), only the icon class is returned.}

\item{solid}{Should the solid or the regular icon be used?}
}
\description{
Create the correct Font Awesome class.

Yükleniyor…
İptal
Kaydet