You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
460 B
TypeScript

'use client';
import styles from './page.module.css'
type TextFieldProps = {
onChange: (value: string) => void,
placeholder?: string,
};
export function TextField(props: TextFieldProps) {
function handleChange(event: React.FormEvent<HTMLTextAreaElement>) {
props.onChange(event.currentTarget.value);
}
return (
<textarea
className={styles.text_field}
placeholder={props.placeholder}
onChange={handleChange}
/>
)
}