#103 タグ補完

This commit is contained in:
2025-09-04 23:55:09 +09:00
parent dd764be0cb
commit 3119d475e5
7 changed files with 108 additions and 34 deletions
+6 -7
View File
@@ -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}/>))