Skip to content

Commit

Permalink
fix(IconLibrary): change path
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan committed Jul 28, 2021
1 parent bb40847 commit 47f2f72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"update-browserslist": "npx browserslist-ga"
},
"engines": {
"node": ">=14"
"node": ">=14.0.0"
},
"browserslist": [
"last 1 edge version",
Expand Down
5 changes: 2 additions & 3 deletions src/components/SVGLibraries/IconLibrary/IconLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ const IconLibrary = () => {
const path = [...icon.namespace, icon.name].join('/');

const glyphOnly = icon.sizes.length === 1 && icon.sizes[0] === 'glyph';
const filePath = glyphOnly ? '' : '32';

return [
...accumulator,
{
...icon,
Component: loadable(() =>
import(
`@carbon/icons-react/lib/${path}/${glyphOnly ? 'index' : '32'}`
)
import(`@carbon/icons-react/lib/${path}/${filePath}`)
),
},
];
Expand Down

0 comments on commit 47f2f72

Please sign in to comment.