babel-plugin-inline-react-svg
babel-plugin-inline-react-svg copied to clipboard
Support for generating SVG components without `.defaultProps`
trafficstars
This should close https://github.com/airbnb/babel-plugin-inline-react-svg/issues/126
I've changed the code to:
- Use inline 'defaultProps' in the generated SVG components
- Use
object.assignto merge the prop overrides (see linked issue) - Use an option (
emitDeprecatedDefaultProps) that allows this package users to still keep emitting thedefaultPropdeclarations
I've made the option to omit default props an opt-out, so it is a breaking change.. but up for the author to change that to a default false