mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
29 lines
498 B
TypeScript
29 lines
498 B
TypeScript
import React from 'react'
|
|
|
|
export default function Input({
|
|
text,
|
|
name,
|
|
value = '',
|
|
placeholder,
|
|
onchange,
|
|
}: {
|
|
text: string
|
|
name: string
|
|
value?: string
|
|
placeholder?: string
|
|
onchange: (name: string, event: React.ChangeEvent<HTMLInputElement>) => void
|
|
}) {
|
|
return (
|
|
<label>
|
|
{text}
|
|
<input
|
|
className={name}
|
|
type="text"
|
|
placeholder={placeholder}
|
|
onChange={onchange.bind(null, name)}
|
|
value={value}
|
|
/>
|
|
</label>
|
|
)
|
|
}
|