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

Export JSX version of svgs (waves) #55

Open
quick007 opened this issue Oct 8, 2021 · 7 comments
Open

Export JSX version of svgs (waves) #55

quick007 opened this issue Oct 8, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@quick007
Copy link

quick007 commented Oct 8, 2021

Hi can you please add a "copy jsx" button ty!

@anup-a
Copy link
Owner

anup-a commented Oct 9, 2021

@quick007 sure great idea. will put it up in the roadmap.

@anup-a anup-a changed the title JSX version Export JSX version of svgs (waves) Oct 9, 2021
@anup-a anup-a added enhancement New feature or request good first issue Good for newcomers hacktoberfest labels Oct 9, 2021
@anup-a
Copy link
Owner

anup-a commented Oct 9, 2021

Description - Right now, we support svgs and png as export option. Request is to also support the jsx version of svgs.

@dexterpuru
Copy link

@anup-a Hey, I am looking into this issue, am i allowed to add a external npm package?

@anup-a
Copy link
Owner

anup-a commented Oct 11, 2021

@dexterpuru hi sure. you can use npm package if it takes minimal space & effort. But I'll recommend you to just export the wave component (which we use in preview) as string. Let me know if there is any issue/ques with this approach.

@dexterpuru
Copy link

@anup-a I see that you pass the ref of whole svg tag to "Export SVG Code" component, I think converting some svg to jsx needs some parsing, i found a pkg that does the parsing, React-SVGR, check its bundle size also , let me know if i can go forward with this.

@quick007
Copy link
Author

quick007 commented Oct 11, 2021

If you want to do it the budget way, you could just replace all the class= to className=
That doesn't fix the gradient issue- nevermind.

@anup-a
Copy link
Owner

anup-a commented Oct 18, 2021

@dexterpuru Sorry forgot to reply to your comment.

React-svgr looks quite bulky to add in this project, I will put some time to find a better solution. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants