Skip to content

Commit

Permalink
chore: 优化生成组件模版代码的Type导出语句
Browse files Browse the repository at this point in the history
  • Loading branch information
79E committed Dec 2, 2022
1 parent 4901fdc commit c93fb4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const createComponentTemplate = ({ name, upperCaseName }) => `\
import React, { useMemo, FunctionComponent, useContext } from 'react';
import ConfigProviderContext from '../config-provider/config-provider-context';
import { useNamespace } from '../../hooks';
import { ${upperCaseName}Props } from './types';
import type { ${upperCaseName}Props } from './types';
export const ${upperCaseName}: FunctionComponent<${upperCaseName}Props> = props => {
const { prefix } = useContext(ConfigProviderContext);
Expand All @@ -57,7 +57,7 @@ const createComponentLessTemplate = ({ name }) => `\

const createTypesTemplate = ({ upperCaseName }) => `\
import React from 'react';
import { BaseTypeProps } from '../../utils';
import type { BaseTypeProps } from '../../utils';
export interface ${upperCaseName}Props extends BaseTypeProps {
Expand Down

0 comments on commit c93fb4c

Please sign in to comment.