Fix missing children
This commit is contained in:
@@ -1,13 +1,12 @@
|
||||
import { FC, FormEvent, SyntheticEvent, useEffect, useState } from 'react'
|
||||
import { result } from '../../../common/result'
|
||||
import { createWish, Wish } from '../models'
|
||||
import { v4 as uuid } from 'uuid'
|
||||
import { FC, ReactNode } from 'react'
|
||||
import { Wish } from '../models'
|
||||
|
||||
interface CreateWishProps {
|
||||
onFocus: () => void
|
||||
hasFocus: boolean
|
||||
onSubmit: (wish: Wish) => void
|
||||
wish: Wish
|
||||
children?: ReactNode
|
||||
}
|
||||
|
||||
const CreateWish: FC<CreateWishProps> = (props) => {
|
||||
@@ -19,7 +18,7 @@ const CreateWish: FC<CreateWishProps> = (props) => {
|
||||
type="text"
|
||||
name="wishName"
|
||||
placeholder="Your wish!"
|
||||
className="w-full appearance-none bg-pink-100 p-6 text-center text-xl outline-none font-medium"
|
||||
className="w-full appearance-none bg-pink-100 p-6 text-center text-xl font-medium outline-none"
|
||||
onChange={(e) =>
|
||||
props.onSubmit({ ...props.wish, name: e.target.value })
|
||||
}
|
||||
@@ -37,6 +36,7 @@ const CreateWish: FC<CreateWishProps> = (props) => {
|
||||
interface InnerWishPromptInterface {
|
||||
wish: Wish
|
||||
onChange: (wish: Wish) => void
|
||||
children?: ReactNode
|
||||
}
|
||||
|
||||
const InnerWishPrompt: FC<InnerWishPromptInterface> = (props) => {
|
||||
@@ -66,7 +66,10 @@ const InnerWishPrompt: FC<InnerWishPromptInterface> = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
export const BasePrompt: FC = (props) => (
|
||||
interface BasePromptProps {
|
||||
children?: ReactNode
|
||||
}
|
||||
export const BasePrompt: FC<BasePromptProps> = (props) => (
|
||||
<div>
|
||||
<div className="space-y-6 bg-white p-4 shadow">{props.children}</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user