-
-
Save ashimon83/77e39b4fdecfe459b0339ea4d02ba6d4 to your computer and use it in GitHub Desktop.
svgr template.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const template = (variables, { tpl }) => { | |
return tpl` | |
${variables.imports}; | |
${variables.interfaces}; | |
const ${variables.componentName} = (${variables.props}) => ( | |
${variables.jsx} | |
); | |
${variables.exports}; | |
` | |
} | |
module.exports = template |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment