Last active
June 26, 2016 08:34
-
-
Save Deraen/8b631c587335a71f9862b744c65ac37b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns foobar.font-awesome | |
(:require [cljsjs.react])) | |
(defn icon [{:keys [name class size rotate flip fixed-width spin pulse stack inverse component] | |
:or {component :span} | |
:as props}] | |
[component | |
(assoc props | |
:class (str "fa fa-" class " " | |
(if size (str "fa-" size)) " " | |
(if rotate (str "fa-rotate-" rotate)) " " | |
(if flip (str "fa-flip-" flip)) " " | |
(if fixed-width "fa-fw") " " | |
(if spin "fa-spin") " " | |
(if pulse "fa-pulse") " " | |
(if stack (str "fa-stack-" stack)) " " | |
(if inverse "fa-inverse")))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment