Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit a2ad509

Browse files
authored
chore: adjust ts template (#1072)
* chore(ts-template): wip * chore(ts-template): wip
1 parent bc67a3b commit a2ad509

File tree

158 files changed

+340
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+340
-383
lines changed

src/components/AlertBar/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
import React from 'react'
7+
import React, { FC } from 'react'
88

99
import { buildLog } from '@/utils'
1010

@@ -17,7 +17,7 @@ type TProps = {
1717
children: React.ReactNode
1818
}
1919

20-
const AlertBar: React.FC<TProps> = ({ children }) => {
20+
const AlertBar: FC<TProps> = ({ children }) => {
2121
return <Wrapper testid="alertBar">{children}</Wrapper>
2222
}
2323

src/components/AvatarsRow/MoreItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22

33
import { prettyNum } from '@/utils'
44
import { Br } from '@/components/Common'
@@ -21,7 +21,7 @@ type TProps = Pick<
2121
'size' | 'total' | 'showTotalNumber' | 'onTotalSelect'
2222
>
2323

24-
const MoreItem: React.FC<TProps> = ({
24+
const MoreItem: FC<TProps> = ({
2525
size,
2626
total,
2727
onTotalSelect,

src/components/AvatarsRow/RealAvatar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22

33
import type { TUser } from '@/spec'
44
import Tooltip from '@/components/Tooltip'
@@ -20,7 +20,7 @@ type TProps = {
2020
onUserSelect: (user: TUser) => void
2121
}
2222

23-
const RealAvatar: React.FC<TProps> = ({ user, size, onUserSelect }) => {
23+
const RealAvatar: FC<TProps> = ({ user, size, onUserSelect }) => {
2424
return (
2525
<Tooltip
2626
content={<UserPopContent>{user.nickname}</UserPopContent>}

src/components/AvatarsRow/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
import React from 'react'
7+
import React, { FC } from 'react'
88
import { compose, not, isNil, filter, reverse as reverseFn, slice } from 'ramda'
99
import { trackWindowScroll } from 'react-lazy-load-image-component'
1010

@@ -52,7 +52,7 @@ export type TProps = {
5252
onTotalSelect: () => void
5353
}
5454

55-
const AvatarsRow: React.FC<TProps> = ({
55+
const AvatarsRow: FC<TProps> = ({
5656
size = SIZE.SMALL,
5757
total,
5858
users = [],

src/components/Buttons/ArrowButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
import React, { useRef, useState, useEffect } from 'react'
7+
import React, { FC, useRef, useState, useEffect } from 'react'
88

99
import type { TSIZE } from '@/spec'
1010
import { ICON } from '@/config'
@@ -26,7 +26,7 @@ type TProps = {
2626
arrowStyle?: 'default' | 'simple'
2727
}
2828

29-
const ArrowButton: React.FC<TProps> = ({
29+
const ArrowButton: FC<TProps> = ({
3030
children = '下一步',
3131
onClick = log,
3232
size = SIZE.SMALL,

src/components/Buttons/ArrowLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
*/
66

7-
import React from 'react'
7+
import React, { FC } from 'react'
88

99
import type { TSIZE } from '@/spec'
1010
import { ICON_CMD } from '@/config'
@@ -26,7 +26,7 @@ type TProps = {
2626
hoverColor?: string
2727
}
2828

29-
const ArrowLink: React.FC<TProps> = ({
29+
const ArrowLink: FC<TProps> = ({
3030
className = '',
3131
children = '下一步',
3232
size = SIZE.SMALL,

src/components/Buttons/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useState } from 'react'
1+
import React, { FC, useEffect, useState } from 'react'
22

33
import type { TSIZE_TSM } from '@/spec'
44
import { SIZE } from '@/constant'
@@ -33,7 +33,7 @@ type TProps = {
3333
disabled?: boolean
3434
}
3535

36-
const Button: React.FC<TProps> = ({
36+
const Button: FC<TProps> = ({
3737
children = 'button',
3838
ghost = false,
3939
type = 'primary',

src/components/Buttons/OrButton/HorizontalButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22

33
import type { TProps as TButtonProps } from './index'
44
import { SIZE } from '@/constant'
@@ -12,7 +12,7 @@ import {
1212

1313
type TProps = Omit<TButtonProps, 'direction'>
1414

15-
const HorizontalButton: React.FC<TProps> = ({
15+
const HorizontalButton: FC<TProps> = ({
1616
onClick,
1717
size = SIZE.SMALL,
1818
activeKey,

src/components/Buttons/OrButton/VerticalButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22

33
import type { TProps as TButtonProps } from './index'
44
import { SIZE } from '@/constant'
@@ -12,7 +12,7 @@ import {
1212

1313
type TProps = Omit<TButtonProps, 'direction'>
1414

15-
const VerticalButton: React.FC<TProps> = ({
15+
const VerticalButton: FC<TProps> = ({
1616
onClick,
1717
size = SIZE.SMALL,
1818
activeKey,

src/components/Buttons/OrButton/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react'
1+
import React, { FC } from 'react'
22

33
import type { TSIZE_SM } from '@/spec'
44

@@ -16,7 +16,7 @@ export type TProps = {
1616
}[]
1717
}
1818

19-
const OrButton: React.FC<TProps> = ({ direction = 'row', ...restProps }) => {
19+
const OrButton: FC<TProps> = ({ direction = 'row', ...restProps }) => {
2020
return direction === 'row' ? (
2121
<HorizontalButton {...restProps} />
2222
) : (

0 commit comments

Comments
 (0)