Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commitca42c83

Browse files
authored
chore: model style && ts import adjust (#1087)
* refactor(user-reaction): add esc hint && convert to ts* chore(import): move ReactNode to top of file
1 parente0c62f0 commitca42c83

File tree

20 files changed

+72
-81
lines changed

20 files changed

+72
-81
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-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88

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

@@ -14,7 +14,7 @@ import { Wrapper } from './styles'
1414
constlog=buildLog('c:AlertBar:index')
1515

1616
typeTProps={
17-
children:React.ReactNode
17+
children:ReactNode
1818
}
1919

2020
constAlertBar:FC<TProps>=({ children})=>{

‎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-
importReact,{FC,useRef,useState,useEffect}from'react'
7+
importReact,{FC,ReactNode,useRef,useState,useEffect}from'react'
88

99
importtype{TSIZE}from'@/spec'
1010
import{ICON}from'@/config'
@@ -17,7 +17,7 @@ import { Wrapper, Text, LeftIcon, RightIcon } from './styles/arrow_button'
1717
constlog=buildLog('c:Buttons:ArrowButton')
1818

1919
typeTProps={
20-
children?:React.ReactNode
20+
children?:ReactNode
2121
onClick?:()=>void
2222
size?:TSIZE
2323
direction?:'left'|'right'

‎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-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88

99
importtype{TSIZE}from'@/spec'
1010
import{ICON_CMD}from'@/config'
@@ -18,7 +18,7 @@ const log = buildLog('c:Buttons:ArrowLink')
1818

1919
typeTProps={
2020
className?:string
21-
children?:React.ReactNode
21+
children?:ReactNode
2222
size?:TSIZE
2323
href:string
2424
target?:'_blank'|''

‎src/components/Buttons/Button.tsx‎

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

33
importtype{TSIZE_TSM}from'@/spec'
44
import{SIZE}from'@/constant'
@@ -21,7 +21,7 @@ const clearTimerIfNeed = (timerId: number): void => {
2121
}
2222

2323
typeTProps={
24-
children?:React.ReactNode
24+
children?:ReactNode
2525
className?:string
2626
ghost?:boolean
2727
type?:'primary'|'red'|'ghost'

‎src/components/Checker/index.tsx‎

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

7-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88

99
importtype{TSIZE_SM}from'@/spec'
1010
import{ICON}from'@/config'
@@ -17,7 +17,7 @@ import { Wrapper, IconWrapper, Icon, ChildWrapper } from './styles'
1717
constlog=buildLog('c:Checker:index')
1818

1919
typeTProps={
20-
children?:React.ReactNode|null
20+
children?:ReactNode|null
2121
checked?:boolean
2222
hiddenMode?:boolean
2323
size?:TSIZE_SM

‎src/components/CustomScroller/index.tsx‎

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

33
importtype{TSIZE_SML}from'@/spec'
44
importtype{TDirection,TScrollDirection}from'./spec'
@@ -8,7 +8,7 @@ import VerticalScroller from './VerticalScroller'
88

99
exporttypeTProps={
1010
direction:TDirection
11-
children:React.ReactNode
11+
children:ReactNode
1212
height?:string
1313
innerHeight?:string
1414
width?:string

‎src/components/DigestSentence/index.tsx‎

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

7-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88

99
import{ICON}from'@/config'
1010
import{buildLog}from'@/utils'
@@ -26,12 +26,12 @@ const log = buildLog('c:DigestSentence:index')
2626

2727
typeTProps={
2828
testid?:string
29-
children:React.ReactNode
30-
onPreview:()=>void
29+
children:ReactNode
3130
top?:number
3231
bottom?:number
3332
left?:number
3433
right?:number
34+
onPreview:()=>void
3535
}
3636

3737
constDigestSentence:FC<TProps>=({

‎src/components/IconText/index.tsx‎

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

7-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88

99
importtype{TSIZE}from'@/spec'
1010
import{buildLog,nilOrEmpty}from'@/utils'
@@ -18,7 +18,7 @@ const log = buildLog('c:IconText:index')
1818
typeTProps={
1919
iconSrc:string
2020
round?:boolean
21-
children:React.ReactNode
21+
children:ReactNode
2222
size?:TSIZE
2323
margin?:string
2424
}

‎src/components/Img/index.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Renders an image, enforcing the usage of the alt="" tag
66
*/
77

8-
importReactfrom'react'
8+
importReact,{ReactNode}from'react'
99
import{ReactSVG}from'react-svg'
1010

1111
import{buildLog}from'@/utils'
@@ -21,7 +21,7 @@ type IProps = {
2121
alt?:string
2222
className?:string
2323
loading?:boolean
24-
fallback?:React.ReactNode|null
24+
fallback?:ReactNode|null
2525
noLazy?:boolean
2626
scrollPosition?:any
2727
// see https://www.npmjs.com/package/react-lazy-load-image-component

‎src/components/MasonryCards/index.tsx‎

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

7-
importReact,{FC}from'react'
7+
importReact,{FC,ReactNode}from'react'
88
importMasonryfrom'react-masonry-css'
99

1010
import{buildLog}from'@/utils'
@@ -17,7 +17,7 @@ const log = buildLog('c:MasonryCards:index')
1717
typeTProps={
1818
testid?:string
1919
column?:number
20-
children:React.ReactNode
20+
children:ReactNode
2121
}
2222

2323
constMasonryCards:FC<TProps>=({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp