mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
37 lines
731 B
TypeScript
37 lines
731 B
TypeScript
import React, { ChangeEvent } from 'react'
|
|
|
|
export default function TextAreaInput({
|
|
text,
|
|
name,
|
|
placeholder,
|
|
onchange,
|
|
value,
|
|
styles = '',
|
|
}: {
|
|
text: string
|
|
name: string
|
|
placeholder: string
|
|
onchange: (name: string, event: ChangeEvent<{ value: string }>) => void
|
|
value: string
|
|
styles?: string
|
|
}) {
|
|
return (
|
|
<>
|
|
<label htmlFor={name} className="pb-label">
|
|
{text}
|
|
</label>
|
|
<div className="mt-1">
|
|
<textarea
|
|
id="about"
|
|
name="about"
|
|
rows={10}
|
|
className={`pb-textarea ${styles}`}
|
|
placeholder={placeholder}
|
|
onChange={onchange.bind(null, name)}
|
|
value={value}
|
|
></textarea>
|
|
</div>
|
|
</>
|
|
)
|
|
}
|