Parcourir la source

fa_icon() make as_html second arg

master
Garrick Aden-Buie il y a 7 ans
Parent
révision
402f313398
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. +2
    -2
      R/utils.R
  2. +3
    -3
      man/fa_icon.Rd

+ 2
- 2
R/utils.R Voir le fichier

@@ -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 Voir le fichier

@@ -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.

Chargement…
Annuler
Enregistrer