11export const felaComponent = ( name : string , dependencies : boolean ) => `${
22 dependencies
3- ? "import { React, FC, FelaWithStylesProps } from '../../dependencies';"
4- : "import React, { FC } from 'react';\nimport type { FelaWithStylesProps } from 'react-fela';"
3+ ? "import { React, FelaWithStylesProps } from '../../dependencies';"
4+ : "import React from 'react';\nimport type { FelaWithStylesProps } from 'react-fela';"
55}
66
77export interface ${ name } OwnProps {}
88
99type ${ name } Props = ${ name } OwnProps & FelaWithStylesProps<${ name } OwnProps, {}>;
1010
11- const ${ name } : FC< ${ name } Props> = ({ styles }) => (
11+ const ${ name } = ({ styles }: ${ name } Props ) => (
1212 <div className={styles.container}>
1313
1414 </div>
@@ -19,15 +19,15 @@ export default ${name};
1919
2020export const felaHookComponent = ( name : string , dependencies : boolean ) => `${
2121 dependencies
22- ? "import { React, FC, useFelaEnhanced } from '../../dependencies';"
23- : "import React, { FC } from 'react';\nimport { useFelaEnhanced } from 'hooks';"
22+ ? "import { React, useFelaEnhanced } from '../../dependencies';"
23+ : "import React from 'react';\nimport { useFelaEnhanced } from 'hooks';"
2424}
2525
2626import * as felaRules from './${ name } .rules';
2727
2828export interface ${ name } Props {}
2929
30- const ${ name } : FC< ${ name } Props> = ( ) => {
30+ const ${ name } = ({}: ${ name } Props) => {
3131 const { styles } = useFelaEnhanced(felaRules);
3232
3333 return (
@@ -51,13 +51,13 @@ export const container: TRule = () => ({});
5151
5252export const component = ( name : string , dependencies : boolean ) => `${
5353 dependencies
54- ? "import { React, FC } from '../../dependencies';"
55- : "import React, { FC } from 'react';"
54+ ? "import { React } from '../../dependencies';"
55+ : "import React from 'react';"
5656}
5757
5858export interface ${ name } Props {}
5959
60- const ${ name } : FC< ${ name } Props> = ( ) => (
60+ const ${ name } = ({}: ${ name } Props) => (
6161 <>
6262
6363 </>
0 commit comments