UNPKG

substance

Version:

Substance is a JavaScript library for web-based content editing. It provides building blocks for realizing custom text editors and web-based publishing system. It is developed to power our online editing platform [Substance](http://substance.io).

13 lines (10 loc) 251 B
import { $$ } from '../dom' const STYLES = { regular: 'far', solid: 'fas' } export default function Icon (props) { const icon = props.icon const fstyle = STYLES[props.style] || 'fa' return $$('i').addClass(fstyle).addClass('fa-' + icon) }