-
-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v3 #195
Conversation
- Add "runtimeConfig" option to enable or disable runtime configuration BREAKING CHANGE: - Runtime configuration is always loaded (even with Node API `convert`) - In CLI, "--config" is now "--config-file"; this new option can be used everywhere Closes #192
This pull request is automatically deployed with Now. |
Removing style tag is an optimization, SVGO can do it better than us. BREAKING CHANGE: Style tag will no longer be automatically removed. SVGO should handle it correctly using "inlineStyles" plugin. If you want to remove them, enable "removeStyleElement" plugin in your SVGO config. Closes #191
Also improve template documentation. Closes #187
I'm not a fun of |
Codecov Report
@@ Coverage Diff @@
## master #195 +/- ##
==========================================
- Coverage 86.88% 85.74% -1.15%
==========================================
Files 26 24 -2
Lines 488 519 +31
Branches 91 103 +12
==========================================
+ Hits 424 445 +21
- Misses 59 66 +7
- Partials 5 8 +3
Continue to review full report at Codecov.
|
@TrySound what is the problem with that? |
I use only named exports and wouldn't like to consider icons like something special. I already use |
@TrySound we only use the default export. So I don't see what is the problem. I suggest you to edit your template and remove |
Okay, if it doesn't affect file name I will just slice prefix. |
@TrySound yeah it is just the component name to avoid problem like "Infinity =". |
I suggest something like this import React from 'react';
export default React.forwardRef((props, ref) =>
<SvgIcon {...props} svgRef={ref} />
) |
@twm what is the difference between this and my implementation? |
I don't see you apply import React from 'react';
export default (props, ref) =>
<SvgIcon {...props} svgRef={ref} /> |
@TrySound https://svgr-mduwqvjvwf.now.sh/ All good except that I forgot |
@TrySound yes, I will name it "ForwardRef" in fact, because it is a component. |
const ForwardRef = React.forwardRef((props, ref) => ...)
export default ForwardRef |
Yes, this is what library should produce. |
Also fix option in website.
This fix incompatible options, "--no-dimensions" will be prioritary. Fixes #141
Summary
See commits.