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

Commit25d747d

Browse files
committed
Import PropsWithChildren in a few components
1 parent8358053 commit25d747d

File tree

7 files changed

+13
-9
lines changed

7 files changed

+13
-9
lines changed

‎site/src/__mocks__/react-markdown.tsx

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

3-
constReactMarkdown:FC<React.PropsWithChildren<unknown>>=({ children})=>{
3+
constReactMarkdown:FC<PropsWithChildren<unknown>>=({ children})=>{
44
return<divdata-testid="markdown">{children}</div>
55
}
66

‎site/src/components/AppLink/AppLink.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Button from "@material-ui/core/Button"
22
importLinkfrom"@material-ui/core/Link"
33
import{makeStyles}from"@material-ui/core/styles"
44
importComputerIconfrom"@material-ui/icons/Computer"
5-
import{FC}from"react"
5+
import{FC,PropsWithChildren}from"react"
66
import*asTypesGenfrom"../../api/typesGenerated"
77
import{generateRandomString}from"../../util/random"
88

@@ -17,7 +17,7 @@ export interface AppLinkProps {
1717
appIcon?:TypesGen.WorkspaceApp["icon"]
1818
}
1919

20-
exportconstAppLink:FC<React.PropsWithChildren<AppLinkProps>>=({
20+
exportconstAppLink:FC<PropsWithChildren<AppLinkProps>>=({
2121
userName,
2222
workspaceName,
2323
appName,

‎site/src/components/AuthAndFrame/AuthAndFrame.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface AuthAndFrameProps {
1313
/**
1414
* Wraps page in RequireAuth and renders it between Navbar and Footer
1515
*/
16-
exportconstAuthAndFrame:FC<React.PropsWithChildren<AuthAndFrameProps>>=({ children})=>{
16+
exportconstAuthAndFrame:FC<PropsWithChildren<AuthAndFrameProps>>=({ children})=>{
1717
conststyles=useStyles()
1818
constxServices=useContext(XServiceContext)
1919

‎site/src/components/AvatarData/AvatarData.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
importAvatarfrom"@material-ui/core/Avatar"
22
importLinkfrom"@material-ui/core/Link"
33
import{makeStyles}from"@material-ui/core/styles"
4-
import{FC}from"react"
4+
import{FC,PropsWithChildren}from"react"
55
import{LinkasRouterLink}from"react-router-dom"
66
import{firstLetter}from"../../util/firstLetter"
77
import{
@@ -18,7 +18,7 @@ export interface AvatarDataProps {
1818
avatar?:React.ReactNode
1919
}
2020

21-
exportconstAvatarData:FC<React.PropsWithChildren<AvatarDataProps>>=({
21+
exportconstAvatarData:FC<PropsWithChildren<AvatarDataProps>>=({
2222
title,
2323
subtitle,
2424
link,

‎site/src/components/BorderedMenu/BorderedMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export type BorderedMenuProps = Omit<PopoverProps, "variant"> & {
88
variant?:BorderedMenuVariant
99
}
1010

11-
exportconstBorderedMenu:FC<React.PropsWithChildren<BorderedMenuProps>>=({
11+
exportconstBorderedMenu:FC<PropsWithChildren<BorderedMenuProps>>=({
1212
children,
1313
variant,
1414
...rest

‎site/src/components/TableCellData/TableCellData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ interface StyleProps {
66
highlight?:boolean
77
}
88

9-
exportconstTableCellData:React.FC<React.PropsWithChildren<unknown>>=({ children})=>{
9+
exportconstTableCellData:React.FC<React.ReactNode>=({ children})=>{
1010
return<Stackspacing={0}>{children}</Stack>
1111
}
1212

‎yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2+
# yarn lockfile v1
3+
4+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp