How to use the @fortawesome/fontawesome-svg-core.library.definitions function in @fortawesome/fontawesome-svg-core

To help you get started, we’ve selected a few @fortawesome/fontawesome-svg-core examples, based on popular ways it is used in public projects.

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

github webiny / webiny-js / packages / webiny-app-cms / src / editor / plugins / icons / index.js View on Github external
init() {
        library.add(fab, fas, far);

        Object.keys(library.definitions).forEach(pack => {
            const defs = library.definitions[pack];
            Object.keys(defs).forEach(icon => {
                icons.push({
                    id: [pack, icon],
                    name: icon,
                    svg: createSvg(defs[icon])
                });
            });
        });
    },
    getIcons() {
github strapi / strapi / packages / strapi-plugin-content-manager / admin / src / components / ComponentIcons / index.js View on Github external
function ComponentIcons() {
  library.add(fas);

  let fasArray = Object.keys(library.definitions.fas);

  return (
    <ul>
      {fasArray.map(fas =&gt; {
        return (
          <li>
            <i>
            {fas}
          </i></li><i>
        );
      })}
    </i></ul><i>
  );
}
</i>
github Okazari / FatesEditions / ui / src / components / Views / Write / Draft / common / IconSelector / IconSelector.js View on Github external
const IconSelector = ({ id, icon, update }) =&gt; {
  const icons = library.definitions.fas
  const options = Object.keys(icons).map(name =&gt; ({
    value: name,
    label: ,
  }))
  return (
    <select value="{{">,
      }}
      onChange={selectedIcon =&gt; update({ id, icon: selectedIcon.value })}
      options={options}
      styles={{
        control: () =&gt; ({
          display: 'flex',</select>
github webiny / webiny-js / packages / webiny-app-cms / src / editor / plugins / icons / index.js View on Github external
Object.keys(library.definitions).forEach(pack => {
            const defs = library.definitions[pack];
            Object.keys(defs).forEach(icon => {
                icons.push({
                    id: [pack, icon],
                    name: icon,
                    svg: createSvg(defs[icon])
                });
            });
        });
    },
github strapi / strapi / packages / strapi-plugin-content-type-builder / admin / src / containers / App / utils / icons.js View on Github external
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';

library.add(fas);

const icons = Object.keys(library.definitions.fas);

export default icons;