We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b1e94a commit 3a4666cCopy full SHA for 3a4666c
src/scripts/Icon.js
@@ -150,13 +150,13 @@ export default class Icon extends Component {
150
},
151
className
152
);
153
- /* eslint-disable max-len */
154
- const useHtml = `<use xlink:href="${getAssetRoot()}/icons/${category}-sprite/svg/symbols.svg#${icon}"></use>`;
+
+ const useHtml = `${getAssetRoot()}/icons/${category}-sprite/svg/symbols.svg#${icon}`;
155
return (
156
<svg
157
className={ iconClassNames }
158
aria-hidden
159
- dangerouslySetInnerHTML={ { __html: useHtml } }
+ <use xlinkHref={useHtml}></use>
160
ref={ node => (this.svgIcon = node) }
161
style={ style }
162
{...props}
0 commit comments