Skip to content

Instantly share code, notes, and snippets.

@ashimon83
Created November 30, 2021 14:20
Show Gist options
  • Save ashimon83/77e39b4fdecfe459b0339ea4d02ba6d4 to your computer and use it in GitHub Desktop.
Save ashimon83/77e39b4fdecfe459b0339ea4d02ba6d4 to your computer and use it in GitHub Desktop.
svgr template.tsx
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