Skip to content

Instantly share code, notes, and snippets.

@stevensacks
Last active November 23, 2019 01:47
Show Gist options
  • Select an option

  • Save stevensacks/0a88e2aaedbb423021189f9e9ac51d91 to your computer and use it in GitHub Desktop.

Select an option

Save stevensacks/0a88e2aaedbb423021189f9e9ac51d91 to your computer and use it in GitHub Desktop.

Revisions

  1. stevensacks revised this gist Oct 29, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion index.js
    Original file line number Diff line number Diff line change
    @@ -2,4 +2,4 @@ import far from './far';
    import fas from './fas';
    import {library} from '@fortawesome/fontawesome-svg-core';

    export default () => library.add.apply(library, fas.concat(far));
    library.add.apply(library, fas.concat(far));
  2. stevensacks created this gist Oct 29, 2019.
    3 changes: 3 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    # FontAwesomeIcon without using as

    To avoid dealing with duplicate names from different icon styles (solid, regular, etc.), just use `apply`!
    11 changes: 11 additions & 0 deletions far.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import {
    faCircle,
    faCoffee,
    faExclamationTriangle,
    } from '@fortawesome/free-regular-svg-icons';

    export default [
    faCircle,
    faCoffee,
    faExclamationTriangle,
    ];
    11 changes: 11 additions & 0 deletions fas.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    import {
    faCircle,
    faCoffee,
    faExclamationTriangle,
    } from '@fortawesome/free-solid-svg-icons';

    export default [
    faCircle,
    faCoffee,
    faExclamationTriangle,
    ];
    5 changes: 5 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    import far from './far';
    import fas from './fas';
    import {library} from '@fortawesome/fontawesome-svg-core';

    export default () => library.add.apply(library, fas.concat(far));