mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 11:34:36 +08:00
1a2df2d581
* Update FontAwesome to v5.0.6 * Adapt DiscussionListItem-count icon to match FontAwesome 5 syntax * Change icon name to match FontAwesome 5.0.6 fas icon * Add font type prefix parameter to icon helper * Add Enable Icon Prefix to show icon in Extension Page * Fix invalid icon behavior * Change icon name to match FontAwesome 5.0.6 far icon * Use iconPrefix property on component * Use full icon class name * Update icon helper docblock * Full icon class syntax
13 lines
362 B
JavaScript
13 lines
362 B
JavaScript
/**
|
||
* The `icon` helper displays an icon.
|
||
*
|
||
* @param {String} fontClass The full icon class, prefix and the icon’s name.
|
||
* @param {Object} attrs Any other attributes to apply.
|
||
* @return {Object}
|
||
*/
|
||
export default function icon(fontClass, attrs = {}) {
|
||
attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');
|
||
|
||
return <i {...attrs}/>;
|
||
}
|