mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 23:00:30 +00:00
25 lines
604 B
JavaScript
25 lines
604 B
JavaScript
|
module.exports = {
|
||
|
// @ts-expect-error -- no types yet exist for svgr
|
||
|
template: ({ template }, options, { componentName, jsx }) => (
|
||
|
template.smart({ plugins: ['jsx', 'typescript'] }).ast`
|
||
|
import React, { SVGProps, memo } from 'react';
|
||
|
|
||
|
export const ${componentName} = memo<SVGProps<SVGSVGElement>>(props => (
|
||
|
${jsx}
|
||
|
));
|
||
|
`),
|
||
|
icon: true,
|
||
|
replaceAttrValues: {
|
||
|
'#000': '',
|
||
|
'#FFF': 'currentColor',
|
||
|
},
|
||
|
ext: 'tsx',
|
||
|
prettier: true,
|
||
|
prettierConfig: {
|
||
|
arrowParens: 'avoid',
|
||
|
singleQuote: true,
|
||
|
parser: 'typescript',
|
||
|
},
|
||
|
typescript: true,
|
||
|
};
|