Unverified Commit d33cb6ec authored by Cole Bemis's avatar Cole Bemis Committed by GitHub

refactor: Use uppercase for default attrs import

parent b22f3b45
import defaultAttrs from '../src/default-attrs.json'; import DEFAULT_ATTRS from '../src/default-attrs.json';
/** /**
* Build an SVG sprite string containing SVG symbols. * Build an SVG sprite string containing SVG symbols.
...@@ -10,7 +10,7 @@ function buildSpriteString(icons) { ...@@ -10,7 +10,7 @@ function buildSpriteString(icons) {
.map(icon => toSvgSymbol(icon, icons[icon])) .map(icon => toSvgSymbol(icon, icons[icon]))
.join(''); .join('');
return `<svg xmlns="${defaultAttrs.xmlns}"><defs>${symbols}</defs></svg>`; return `<svg xmlns="${DEFAULT_ATTRS.xmlns}"><defs>${symbols}</defs></svg>`;
} }
/** /**
...@@ -20,7 +20,7 @@ function buildSpriteString(icons) { ...@@ -20,7 +20,7 @@ function buildSpriteString(icons) {
* @returns {string} * @returns {string}
*/ */
function toSvgSymbol(name, contents) { function toSvgSymbol(name, contents) {
return `<symbol id="${name}" viewBox="${defaultAttrs.viewBox}">${ return `<symbol id="${name}" viewBox="${DEFAULT_ATTRS.viewBox}">${
contents contents
}</symbol>`; }</symbol>`;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment