File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -64,9 +64,12 @@ function initComponent(): InitRes {
64
64
const content = `
65
65
import React from 'react';
66
66
import type { ${ props } } from './${ getFilename ( 'types' ) . replace ( / \. t s $ / , '' ) } ';
67
+ import { getComponentClass } from '@pkg/shared';
67
68
68
- export const ${ componentName } : React.FC< ${ props } > = (props) => {
69
+ const rootName = getComponentClass(' ${ config . name } ');
69
70
71
+ export const ${ componentName } : React.FC<${ props } > = (props) => {
72
+ return <div {...props} className={rootName}></div>;
70
73
};
71
74
` ;
72
75
@@ -75,7 +78,11 @@ export const ${componentName}: React.FC<${props}> = (props) => {
75
78
function initTypes ( ) : InitRes {
76
79
const filename = getFilename ( 'types' ) ;
77
80
const content = `
78
- export interface ${ config . componentName } Props {}
81
+ import React from 'react';
82
+
83
+ export type DividerProps = React.HTMLAttributes<HTMLElement> & {
84
+ name?: string;
85
+ };
79
86
` ;
80
87
return [ filename , content ] ;
81
88
}
You can’t perform that action at this time.
0 commit comments