de7da9f1db
- 在 tailwind.config.js 中启用 darkMode: 'class' 并扩展语义化颜色变量 - 将全项目硬编码颜色(bg-white、text-gray-*、border-gray-* 等)替换为语义化类名 - 修复 popup/index.html 硬编码浅色背景色 - 同步更新相关单元测试中的类名断言
38 lines
829 B
TypeScript
38 lines
829 B
TypeScript
import TextInputArea from '@/components/TextInputArea';
|
|
|
|
interface JsonDiffInputProps {
|
|
label: string;
|
|
placeholder: string;
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
error?: string | null;
|
|
}
|
|
|
|
export default function JsonDiffInput({
|
|
label,
|
|
placeholder,
|
|
value,
|
|
onChange,
|
|
error,
|
|
}: JsonDiffInputProps) {
|
|
return (
|
|
<div className="flex-1 min-w-0">
|
|
<span className="block mb-1.5 text-[11px] font-extrabold tracking-wider text-muted-foreground uppercase">
|
|
{label}
|
|
</span>
|
|
<TextInputArea
|
|
value={value}
|
|
onChange={onChange}
|
|
placeholder={placeholder}
|
|
minRows={8}
|
|
autoResize={false}
|
|
externalError={error ?? undefined}
|
|
showClear={true}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export { JsonDiffInput };
|
|
export type { JsonDiffInputProps };
|