Skip to content
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

Add svgAttribute option #87

Closed
gregberge opened this issue May 12, 2018 · 2 comments
Closed

Add svgAttribute option #87

gregberge opened this issue May 12, 2018 · 2 comments
Milestone

Comments

@gregberge
Copy link
Owner

Users need to add default attribute to their SVG, like in #82. My proposition is to add a "svgAttribute" option.

Usage in CLI

svgr --svg-attribute "focusable=false"
svgr --svg-attribute "a=b" --svg-attribute "c=d"

At first, all attribute values will be considered as a string

Usage in Node / Webpack

transform("...", { svgAttributes: { focusable: "false" } })
transform("...", { svgAttributes: { a: "b", c: "d" } })
@gregberge gregberge added this to the v2 milestone May 12, 2018
@gregberge gregberge mentioned this issue May 12, 2018
8 tasks
@ivarne
Copy link

ivarne commented May 14, 2018

Seems like a pretty solution to the problem i was having.

+1

@marques-kevin
Copy link
Contributor

Hello ! I am working on it :)

I'll will do a Pull Request very soon (in maybe one hour), but I'm new in Open Source project so i am searching best practices for making very clear pull request, issues...

marques-kevin added a commit to marques-kevin/svgr that referenced this issue May 22, 2018
marques-kevin added a commit to marques-kevin/svgr that referenced this issue May 22, 2018
marques-kevin pushed a commit to marques-kevin/svgr that referenced this issue May 22, 2018
marques-kevin added a commit to marques-kevin/svgr that referenced this issue May 23, 2018
marques-kevin added a commit to marques-kevin/svgr that referenced this issue May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants