How to use 'fontawesome 4.7 cdn' in JavaScript

Every line of 'fontawesome 4.7 cdn' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
308function FontAwesomeIcon(props) {
309 var iconArgs = props.icon,
310 maskArgs = props.mask,
311 symbol = props.symbol,
312 className = props.className,
313 title = props.title;
314 var iconLookup = normalizeIconArgs(iconArgs);
315 var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));
316 var transform = objectWithKey('transform', typeof props.transform === 'string' ? fontawesomeSvgCore.parse.transform(props.transform) : props.transform);
317 var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));
318 var renderedIcon = fontawesomeSvgCore.icon(iconLookup, _objectSpread2({}, classes, {}, transform, {}, mask, {
319 symbol: symbol,
320 title: title
321 }));
322
323 if (!renderedIcon) {
324 log('Could not find icon', iconLookup);
325 return null;
326 }
327
328 var abstract = renderedIcon.abstract;
329 var extraProps = {};
330 Object.keys(props).forEach(function (key) {
331 if (!FontAwesomeIcon.defaultProps.hasOwnProperty(key)) {
332 // eslint-disable-line no-prototype-builtins
333 extraProps[key] = props[key];
334 }
335 });
336 return convertCurry(abstract[0], extraProps);
337}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code


Related snippets