Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {library, config} from '@fortawesome/fontawesome-svg-core';
import {fab} from '@fortawesome/free-brands-svg-icons';
import {fas} from '@fortawesome/free-solid-svg-icons';
import {far} from '@fortawesome/free-regular-svg-icons';
import {themr} from '@friendsofreactjs/react-css-themr';
import identifiers from '../identifiers';
import style from './style.css';
import Icon from './icon';
/* eslint-disable no-unused-vars */
import faStyle from '@fortawesome/fontawesome-svg-core/styles.css';
/* eslint-enable no-unused-vars */
config.autoAddCss = false;
config.familyPrefix = 'neos-fa';
config.replacementClass = 'neos-svg-inline--fa';
library.add(fab, fas, far);
const ThemedIcon = themr(identifiers.icon, style)(Icon);
export default ThemedIcon;
const renderedIcon = icon(iconLookup, o)
if (renderedIcon) {
const abstract = renderedIcon.abstract[0]
this.set('children', abstract.children)
abstract.attributes && Object.keys(abstract.attributes).forEach(attr => {
if ( attr === 'style' ) {
this.set('_frameworkStyle', abstract.attributes[attr])
} else {
this.set(attr, abstract.attributes[attr])
}
})
} else {
Ember.Logger.warn(`Could not find icon: iconName=${iconLookup.iconName}, prefix=${iconLookup.prefix}`)
this.set('class', config.replacementClass)
this.set('viewBox', '0 0 448 512')
}
}
});
import { config } from '@fortawesome/fontawesome-svg-core';
export const faNotFoundIconHtml = `<svg viewBox="0 0 448 512" class="${config.replacementClass}"></svg>`;
import { config } from '@fortawesome/fontawesome-svg-core';
export const faNotFoundIconHtml = `<svg viewBox="0 0 448 512" class="${config.replacementClass}"></svg>`;
function getReplacementClass() {
return config.replacementClass;
}
allClasses: computed('abstractIcon', 'attributes.class', 'class', function () {
const abstractIcon = this.get('abstractIcon');
if (!abstractIcon) {
return config.replacementClass;
}
const attributes = this.get('attributes');
const iconClasses = getWithDefault(attributes, 'class');
return iconClasses;
}),
'data-prefix': computed('attributes.data-prefix', function () {