初始化项目;更新至 v0.1.0_20251209 版本

This commit is contained in:
2025-12-09 22:18:14 +08:00
parent 051d9603b1
commit 2c7cbac954
15 changed files with 584 additions and 2 deletions

25
components/TextArea.tsx Normal file
View File

@@ -0,0 +1,25 @@
import React from 'react';
interface TextAreaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
label: string;
helperText?: string;
}
export const TextArea: React.FC<TextAreaProps> = ({ label, helperText, className = '', ...props }) => {
return (
<div className="flex flex-col gap-1.5 h-full">
<div className="flex justify-between items-baseline">
<label className="block text-sm font-semibold text-gray-700">
{label}
</label>
{helperText && (
<span className="text-xs text-gray-500 italic">{helperText}</span>
)}
</div>
<textarea
className={`flex-1 w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm p-3 border resize-none font-mono bg-white text-gray-800 ${className}`}
{...props}
/>
</div>
);
};