Skip to content

Commit

Permalink
fix: fix width / height override
Browse files Browse the repository at this point in the history
  • Loading branch information
gregberge committed Mar 25, 2018
1 parent b81d1ad commit 1f91705
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/cli/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`cli --icon 1`] = `
"import React from \\"react\\";
const One = props => (
<svg viewBox=\\"0 0 48 1\\" {...props} width=\\"1em\\" height=\\"1em\\">
<svg viewBox=\\"0 0 48 1\\" width=\\"1em\\" height=\\"1em\\" {...props}>
<path d=\\"M0 0h48v1H0z\\" fill=\\"#063855\\" fillRule=\\"evenodd\\" />
</svg>
);
Expand Down Expand Up @@ -312,7 +312,7 @@ exports[`cli --ref 1`] = `
"import React from \\"react\\";
const One = ({ svgRef, ...props }) => (
<svg width={48} height={1} viewBox=\\"0 0 48 1\\" {...props} ref={svgRef}>
<svg width={48} height={1} viewBox=\\"0 0 48 1\\" ref={svgRef} {...props}>
<title>Rectangle 5</title>
<path d=\\"M0 0h48v1H0z\\" fill=\\"#063855\\" fillRule=\\"evenodd\\" />
</svg>
Expand Down
4 changes: 2 additions & 2 deletions src/configToOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ function configToOptions(config = {}) {
plugins.push(replaceAttrValue(oldValue, newValue))
})
if (!config.dimensions) plugins.push(removeDimensions)
if (config.expandProps) plugins.push(expandProps)
if (config.icon) plugins.push(emSize)
if (config.native) plugins.push(toReactNative)
if (config.ref) plugins.push(svgRef)
if (config.expandProps) plugins.push(expandProps)
if (config.native) plugins.push(toReactNative)

return plugins
}
Expand Down

0 comments on commit 1f91705

Please sign in to comment.