Skip to content

Commit 25d747d

Browse files
committed
Import PropsWithChildren in a few components
1 parent 8358053 commit 25d747d

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-
const ReactMarkdown: FC<React.PropsWithChildren<unknown>> = ({ children }) => {
3+
const ReactMarkdown: FC<PropsWithChildren<unknown>> = ({ children }) => {
44
return <div data-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
import Link from "@material-ui/core/Link"
33
import { makeStyles } from "@material-ui/core/styles"
44
import ComputerIcon from "@material-ui/icons/Computer"
5-
import { FC } from "react"
5+
import { FC, PropsWithChildren } from "react"
66
import * as TypesGen from "../../api/typesGenerated"
77
import { generateRandomString } from "../../util/random"
88

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

20-
export const AppLink: FC<React.PropsWithChildren<AppLinkProps>> = ({
20+
export const AppLink: 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-
export const AuthAndFrame: FC<React.PropsWithChildren<AuthAndFrameProps>> = ({ children }) => {
16+
export const AuthAndFrame: FC<PropsWithChildren<AuthAndFrameProps>> = ({ children }) => {
1717
const styles = useStyles()
1818
const xServices = 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
import Avatar from "@material-ui/core/Avatar"
22
import Link from "@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 { Link as RouterLink } 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-
export const AvatarData: FC<React.PropsWithChildren<AvatarDataProps>> = ({
21+
export const AvatarData: 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-
export const BorderedMenu: FC<React.PropsWithChildren<BorderedMenuProps>> = ({
11+
export const BorderedMenu: 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-
export const TableCellData: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => {
9+
export const TableCellData: React.FC<React.ReactNode> = ({ children }) => {
1010
return <Stack spacing={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)