mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
types: children ReactNode
This commit is contained in:
parent
eaf0842672
commit
cf36193c8e
@ -1,4 +1,5 @@
|
||||
import Link from 'next/link'
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
const Button = ({ type='button', className, children, href, onClick }: ButtonProps):JSX.Element => {
|
||||
return href ? <Link href={href}>
|
||||
@ -15,7 +16,7 @@ const Button = ({ type='button', className, children, href, onClick }: ButtonPro
|
||||
interface ButtonProps {
|
||||
type?: 'button' | 'submit' | 'reset'
|
||||
className?: string
|
||||
children: JSX.Element | string
|
||||
children: ReactNode
|
||||
href?: string
|
||||
onClick?: () => void
|
||||
}
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import { ReactNode } from 'react'
|
||||
|
||||
const Container = ({
|
||||
ignoreColor,
|
||||
className,
|
||||
@ -19,7 +21,7 @@ interface ContainerProps {
|
||||
ignoreColor?: boolean
|
||||
className?: string
|
||||
paddingTop?: boolean
|
||||
children: JSX.Element | JSX.Element[]
|
||||
children: ReactNode
|
||||
}
|
||||
|
||||
export default Container
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user