Skip to content

Commit 23674a3

Browse files
committed
Add PropsWithChildren for now
1 parent f64112e commit 23674a3

File tree

11 files changed

+32
-22
lines changed

11 files changed

+32
-22
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webdevhome.github.io-vite",
3-
"version": "2.0.11",
3+
"version": "2.0.11.1",
44
"scripts": {
55
"dev": "vite",
66
"build": "tsc && vite build",

src/components/App/AppContent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classNames from 'classnames'
2-
import { FC } from 'react'
2+
import { FC, PropsWithChildren } from 'react'
33

4-
export const AppContent: FC = ({ children }) => {
4+
export const AppContent: FC<PropsWithChildren> = ({ children }) => {
55
return (
66
<div
77
className={classNames(

src/components/Footer/AppFooter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { FC } from 'react'
1+
import { FC, PropsWithChildren } from 'react'
22
import classNames from 'classnames'
33

4-
export const AppFooter: FC = ({ children }) => {
4+
export const AppFooter: FC<PropsWithChildren> = ({ children }) => {
55
return (
66
<div
77
className={classNames(

src/components/Footer/FooterGroupLink.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import classNames from 'classnames'
2-
import { FC } from 'react'
2+
import { FC, PropsWithChildren } from 'react'
33

44
interface Props {
55
href: string
66
}
77

8-
export const FooterGroupLink: FC<Props> = ({ href, children }) => {
8+
export const FooterGroupLink: FC<PropsWithChildren<Props>> = ({
9+
href,
10+
children,
11+
}) => {
912
return (
1013
<a
1114
className={classNames(
@@ -15,7 +18,7 @@ export const FooterGroupLink: FC<Props> = ({ href, children }) => {
1518
'hover:text-brand-600 hover:dark:text-brand-50',
1619
'hover:bg-gray-300 dark:hover:bg-gray-500',
1720
'rounded',
18-
'focus:outline outline-1 outline-gray-500 dark:outline-gray-300'
21+
'focus:outline outline-1 outline-gray-500 dark:outline-gray-300',
1922
)}
2023
href={href}
2124
>

src/components/Footer/FooterGroupText.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import classNames from 'classnames'
2-
import { FC } from 'react'
2+
import { FC, PropsWithChildren } from 'react'
33

44
interface Props {
55
className?: string
66
}
77

8-
export const FooterGroupText: FC<Props> = ({ className = '', children }) => {
8+
export const FooterGroupText: FC<PropsWithChildren<Props>> = ({
9+
className = '',
10+
children,
11+
}) => {
912
return (
1013
<div className={classNames('px-2 py-2 sm:mx-1', 'text-sm', className)}>
1114
{children}

src/components/Links/LinkAction.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import classNames from 'classnames'
2-
import { FC, MouseEvent } from 'react'
2+
import { FC, MouseEvent, PropsWithChildren } from 'react'
33

44
interface Props {
55
className?: string
66
hasHover?: boolean
77
onClick?: (event: MouseEvent<HTMLDivElement>) => void
88
}
99

10-
export const LinkAction: FC<Props> = ({
10+
export const LinkAction: FC<PropsWithChildren<Props>> = ({
1111
children,
1212
className,
1313
hasHover = false,

src/components/Links/LinkGroupButton.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
import classNames from 'classnames'
2-
import { FC } from 'react'
2+
import { FC, PropsWithChildren } from 'react'
33

44
interface Props {
55
onClick?: () => void
66
}
77

8-
export const LinkGroupButton: FC<Props> = ({ children, onClick }) => {
8+
export const LinkGroupButton: FC<PropsWithChildren<Props>> = ({
9+
children,
10+
onClick,
11+
}) => {
912
return (
1013
<button
1114
className={classNames(

src/components/Search/SearchHint.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { FC, Fragment } from 'react'
1+
import { FC, Fragment, PropsWithChildren } from 'react'
22
import { Kbd } from '../basics/Kbd'
33

44
interface Props {
55
inputs?: string[]
66
}
77

8-
export const SearchHint: FC<Props> = ({ children, inputs }) => {
8+
export const SearchHint: FC<PropsWithChildren<Props>> = ({
9+
children,
10+
inputs,
11+
}) => {
912
return (
1013
<div className="mt-4">
1114
{inputs !== undefined && inputs.length > 0 ? (
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { FC } from 'react'
1+
import { FC, PropsWithChildren } from 'react'
22

3-
export const SearchHints: FC = ({ children }) => {
3+
export const SearchHints: FC<PropsWithChildren> = ({ children }) => {
44
return <div className="mx-8 text-lg">{children}</div>
55
}

src/components/basics/Kbd.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classNames from 'classnames'
2-
import { FC } from 'react'
2+
import { FC, PropsWithChildren } from 'react'
33

4-
export const Kbd: FC = ({ children }) => {
4+
export const Kbd: FC<PropsWithChildren> = ({ children }) => {
55
return (
66
<kbd
77
className={classNames(

0 commit comments

Comments
 (0)