docs(design): 解压 Maestro Design System 到 design/(重构参照材料)
phosphor console v1.1 设计系统(从现网 web/style.css 演化):tokens(colors/effects/ typography/fonts) + components(core/forms/surfaces .jsx) + ui_kits(console + console_mobile) + assets/icons(15 双色 SVG) + guidelines + CLAUDE/SKILL/readme。供 B1–B6 重构任务对照实现。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { ensureFieldCss } from './Input.jsx';
|
||||
|
||||
export function Textarea({ label, required, placeholder, value, defaultValue, onChange, minHeight = 72, danger, style }) {
|
||||
ensureFieldCss();
|
||||
const ctrl = (
|
||||
<textarea className="m-input" placeholder={placeholder} value={value} defaultValue={defaultValue}
|
||||
style={{ resize: 'vertical', minHeight, width: '100%', ...(danger ? { borderColor: 'var(--red-dim)' } : {}), ...style }}
|
||||
onChange={onChange ? (e) => onChange(e.target.value) : undefined} readOnly={value !== undefined && !onChange} />
|
||||
);
|
||||
if (!label) return ctrl;
|
||||
return (
|
||||
<label className="m-label" style={{ width: '100%' }}>
|
||||
<span>{label}{required ? <span className="m-req"> *</span> : null}</span>
|
||||
{ctrl}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user