mirror of
https://github.com/flarum/core.git
synced 2025-06-22 02:34:47 +02:00
FontAwesome v5.0.6 (#1372)
* 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
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
/**
|
||||
* The `icon` helper displays a FontAwesome icon. The fa-fw class is applied.
|
||||
* The `icon` helper displays an icon.
|
||||
*
|
||||
* @param {String} name The name of the icon class, without the `fa-` prefix.
|
||||
* @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(name, attrs = {}) {
|
||||
attrs.className = 'icon fa fa-' + name + ' ' + (attrs.className || '');
|
||||
export default function icon(fontClass, attrs = {}) {
|
||||
attrs.className = 'icon ' + fontClass + ' ' + (attrs.className || '');
|
||||
|
||||
return <i {...attrs}/>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user