Give react children explicit types

This commit is contained in:
Forrest Wolf 2022-05-25 11:22:12 -04:00
parent 8ff3f8336c
commit 40fd467f22
3 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,7 @@
import clsx from 'clsx'
import { useState } from 'react'
import { useState, ReactNode } from 'react'
export function AdvancedPanel(props: { children: any }) {
export function AdvancedPanel(props: { children: ReactNode }) {
const { children } = props
const [collapsed, setCollapsed] = useState(true)

View File

@ -1,5 +1,5 @@
import clsx from 'clsx'
import { useState } from 'react'
import { ReactNode, useState } from 'react'
import { Col } from './layout/col'
import { Modal } from './layout/modal'
import { Row } from './layout/row'
@ -20,7 +20,7 @@ export function ConfirmationButton(props: {
className?: string
}
onSubmit: () => void
children: any
children: ReactNode
}) {
const { id, openModalBtn, cancelBtn, submitBtn, onSubmit, children } = props

View File

@ -1,5 +1,7 @@
import { ReactChild } from 'react'
export const JoinSpans = (props: {
children: any[]
children: ReactChild[]
separator?: JSX.Element | string
}) => {
const { separator } = props