aboutsummaryrefslogtreecommitdiff
path: root/scripts/svgr-template.js
diff options
context:
space:
mode:
authorcodecalm <codecalm@gmail.com>2022-04-16 14:50:51 +0200
committercodecalm <codecalm@gmail.com>2022-04-16 14:50:51 +0200
commitc291772a85d309a32896ce7d616157d93e631408 (patch)
tree19c9596f3e85df49c11f62cb099a3d7e3391926b /scripts/svgr-template.js
parentMerge branch 'master' of https://github.com/tabler/tabler-icons into v2.0 (diff)
downloadtabler-icons-c291772a85d309a32896ce7d616157d93e631408.tar.xz
icons-react build
Diffstat (limited to 'scripts/svgr-template.js')
-rw-r--r--scripts/svgr-template.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/svgr-template.js b/scripts/svgr-template.js
new file mode 100644
index 00000000..c8c41384
--- /dev/null
+++ b/scripts/svgr-template.js
@@ -0,0 +1,12 @@
+function template(
+ { template },
+ opts,
+ { imports, componentName, props, jsx, exports },
+) {
+ return template.ast`
+ ${imports}
+ function ${componentName}({ size = 24, color = "currentColor", stroke = 2, ...props }) { return (${jsx}); }
+ ${exports}
+ `;
+}
+module.exports = template;