mirror of
https://github.com/Vikeo/LifeTrinket.git
synced 2025-11-17 16:27:59 +00:00
config vite
This commit is contained in:
26
template.js
26
template.js
@@ -1,5 +1,5 @@
|
||||
const propTypesTemplate = (
|
||||
{ imports, interfaces, componentName, props, jsx, exports },
|
||||
{ interfaces, componentName, props, jsx },
|
||||
{ tpl }
|
||||
) => {
|
||||
const title = componentName.split('Svg')[1];
|
||||
@@ -17,20 +17,24 @@ const propTypesTemplate = (
|
||||
optional: true,
|
||||
});
|
||||
|
||||
return tpl`${imports}
|
||||
return tpl`
|
||||
import PropTypes from 'prop-types';
|
||||
import { SVGProps } from "react";
|
||||
|
||||
${interfaces}
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
${interfaces}
|
||||
const ${title} = (${props}) => {
|
||||
return ${jsx};
|
||||
}
|
||||
|
||||
const ${title} = (${props}) => {
|
||||
return ${jsx};
|
||||
}
|
||||
${title}.propTypes = {
|
||||
title: PropTypes.string,
|
||||
};
|
||||
|
||||
${title}.propTypes = {
|
||||
title: PropTypes.string,
|
||||
export default ${title}`;
|
||||
};
|
||||
|
||||
export default ${title}`;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
module.exports = propTypesTemplate;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user