Skip to content

Commit 82cf5a7

Browse files
committed
🐛 Fix typescript templates
1 parent 964902e commit 82cf5a7

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

src/template/componentsTypescrip.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
export const felaComponent = (name: string, dependencies: boolean) => `${
22
dependencies
33
? "import { React,  FunctionComponent, FelaWithStylesProps } from '../../dependencies';"
4-
: "import React, { FunctionComponent } from 'react';\nimport { FelaWithStylesProps } from 'react-fela';"
4+
: "import React, { FunctionComponent } from 'react';\nimport type { FelaWithStylesProps } from 'react-fela';"
55
}
66
7-
export interface ${name}OwnProps = {}
7+
export interface ${name}OwnProps {}
88
9-
type ${name}Props = ${name}OwnProps & FelaWithStylesProps<${name}OwnProps, {}>
9+
type ${name}Props = ${name}OwnProps & FelaWithStylesProps<${name}OwnProps, {}>;
1010
1111
const ${name}: FunctionComponent<${name}Props> = ({ styles }) => (
1212
<div className={styles.container}>
@@ -20,14 +20,14 @@ export default ${name};
2020
export const felaHookComponent = (name: string, dependencies: boolean) => `${
2121
dependencies
2222
? "import { React,  FunctionComponent, FelaWithStylesProps, useFelaEnhanced } from '../../dependencies';"
23-
: "import React, { FunctionComponent } from 'react';\nimport { FelaWithStylesProps } from 'react-fela';\nimport { useFelaEnhanced } from 'hooks';"
23+
: "import React, { FunctionComponent } from 'react';\nimport type { FelaWithStylesProps } from 'react-fela';\nimport { useFelaEnhanced } from 'hooks';"
2424
}
2525
2626
import * as rules from './${name}.styles';
2727
28-
export interface ${name}OwnProps = {}
28+
export interface ${name}OwnProps {}
2929
30-
type ${name}Props = ${name}OwnProps & FelaWithStylesProps<${name}OwnProps, {}>
30+
type ${name}Props = ${name}OwnProps & FelaWithStylesProps<${name}OwnProps, {}>;
3131
3232
const ${name}: FunctionComponent<${name}Props> = () => {
3333
const { styles } = useFelaEnhanced(rules);
@@ -57,7 +57,7 @@ export const component = (name: string, dependencies: boolean) => `${
5757
: "import React, { FunctionComponent } from 'react';"
5858
}
5959
60-
export interface ${name}Props = {}
60+
export interface ${name}Props {}
6161
6262
const ${name}: FunctionComponent<${name}Props> = () => (
6363
<>

0 commit comments

Comments
 (0)