drop some types in

This commit is contained in:
Thomas Ruoff
2021-02-14 22:47:44 +01:00
parent 81db4b5d0e
commit 85a7b54a13
13 changed files with 116 additions and 45 deletions

View File

@@ -1,15 +1,27 @@
import React from 'react'
export default function (props) {
export default function Input({
text,
name,
value,
placeholder,
onchange,
}: {
text: string
name: string
value: string
placeholder: string
onchange: () => void
}) {
return (
<label>
{props.text}
{text}
<input
className={props.name}
className={name}
type="text"
placeholder={props.placeholder}
onChange={props.onchange.bind(null, props.name)}
value={props.value}
placeholder={placeholder}
onChange={onchange.bind(null, name)}
value={value}
/>
</label>
)