Fix missing children
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-10-27 21:46:17 +02:00
parent e21c3397c2
commit 13e5d967ce
5 changed files with 30 additions and 18 deletions

View File

@@ -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>