@omni-door/tpl-spa-react
Version:
The React single-page-application project template
10 lines (9 loc) • 833 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.tpl_src_page_page = void 0;
var utils_1 = require("@omni-door/utils");
var tpl = "`import { memo } from 'react';\n${style ? `import './style/${pageName}.${style === 'all' ? 'scss' : style}';` : ''}\n${ts ? `/* import types */\nimport type { FC, PropsWithChildren } from 'react';\nimport type { PageProps } from '@/@types';\n\nexport interface ${pageName}Props extends PageProps {}\n` : ''}\nexport const ${pageName}${ts ? `: FC<PropsWithChildren<${pageName}Props>>` : ''} = props => {\n return (\n <div\n className='${pageName}'\n >\n ${content}\n </div>\n );\n};\n\nexport default memo(${pageName});\n`";
exports.tpl_src_page_page = {
tpl: tpl
};
exports.default = utils_1.tplEngineInit(exports.tpl_src_page_page, 'tpl');