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).
15 lines (13 loc) • 395 B
JavaScript
import Component from '../dom/Component'
export default class FontAwesomeIcon extends Component {
render ($$) {
if (this.props.stack) {
return $$('span').addClass('fa-stack')
.append(this.props.stack.map(faClass => {
return $$('i').addClass('fa ' + faClass + ' fa-stack')
}))
} else {
return $$('i').addClass('fa ' + this.props.icon)
}
}
}