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

feat: generate react-native icon components that use react-native-svg #87

Merged
merged 3 commits into from
Sep 28, 2021

Conversation

sternetj
Copy link
Contributor

Adds command for generating React Native components from the svg files. The SVG components use react-native-svg for rendering the icons so that package is added as an optional peer dependency

ynotdraw
ynotdraw previously approved these changes Sep 28, 2021
Copy link
Contributor

@ynotdraw ynotdraw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

"generate:index-file": "echo \"export * from './lined'\" > src/index.tsx",
"generate:react-components": "svgr --template svg-template.js src/raw/lined --out-dir src/lined --typescript",
"generate:react-native-components": "svgr --template svg-rn-template.js src/raw/lined --out-dir src/lined/react-native --typescript --native",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, svgr is great! Glad you figured this out!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

svg-rn-template.js Outdated Show resolved Hide resolved
@sternetj sternetj requested a review from ynotdraw September 28, 2021 16:08
@sternetj sternetj merged commit f8611dd into master Sep 28, 2021
@sternetj sternetj deleted the support-react-native-svg branch September 28, 2021 16:40
@github-actions
Copy link

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants