#103 タグ補完
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
import React from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
|
||||
type Props = { value?: string
|
||||
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void }
|
||||
import type { TextareaHTMLAttributes } from 'react'
|
||||
|
||||
type Props = TextareaHTMLAttributes<HTMLTextAreaElement>
|
||||
|
||||
|
||||
export default ({ value, onChange }: Props) => (
|
||||
<textarea className="rounded border w-full p-2 h-32"
|
||||
value={value}
|
||||
onChange={onChange}/>)
|
||||
export default forwardRef<HTMLTextAreaElement, Props> (({ ...props }, ref) => (
|
||||
<textarea ref={ref} className="rounded border w-full p-2 h-32" {...props}/>))
|
||||
|
||||
Reference in New Issue
Block a user