Give react children explicit types
This commit is contained in:
parent
8ff3f8336c
commit
40fd467f22
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { ReactChild } from 'react'
|
||||
|
||||
export const JoinSpans = (props: {
|
||||
children: any[]
|
||||
children: ReactChild[]
|
||||
separator?: JSX.Element | string
|
||||
}) => {
|
||||
const { separator } = props
|
||||
|
|
Loading…
Reference in New Issue
Block a user