import React from 'react';

/**
 * 汎用的なテキストエリアコンポーネント
 * @param {object} props - React props (通常のtextareaが受け取る属性をそのまま渡せる)
 */
function Textarea(props) {
    const baseClasses = "mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm";
    const disabledClasses = "disabled:bg-gray-100";

    return (
        <textarea
            {...props}
            className={`${baseClasses} ${disabledClasses} ${props.className || ''}`}
        />
    );
}

export default Textarea;
