UNPKG

@backstage/cli

Version:

CLI for developing Backstage plugins and apps

22 lines (16 loc) 566 B
'use strict'; function svgrTemplate({ imports, interfaces, componentName, props, jsx }, { tpl }) { const name = `${componentName.replace(/icon$/, "")}Icon`; const defaultExport = { type: "ExportDefaultDeclaration", declaration: { type: "Identifier", name } }; return tpl` ${imports} import SvgIcon from '@material-ui/core/SvgIcon'; ${interfaces} const ${name} = (${props}) => React.createElement(SvgIcon, ${props}, ${jsx.children}); ${defaultExport}`; } exports.svgrTemplate = svgrTemplate; //# sourceMappingURL=svgrTemplate-d1dad6d3.cjs.js.map