Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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() {
function ComponentIcons() {
library.add(fas);
let fasArray = Object.keys(library.definitions.fas);
return (
<ul>
{fasArray.map(fas => {
return (
<li>
<i>
{fas}
</i></li><i>
);
})}
</i></ul><i>
);
}
</i>
const IconSelector = ({ id, icon, update }) => {
const icons = library.definitions.fas
const options = Object.keys(icons).map(name => ({
value: name,
label: ,
}))
return (
<select value="{{">,
}}
onChange={selectedIcon => update({ id, icon: selectedIcon.value })}
options={options}
styles={{
control: () => ({
display: 'flex',</select>
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])
});
});
});
},
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;