/**
 * title: "段落输入框"
 * description: "为 `Input` 设置 `disabled` 状态,通过state添加错误状态。"
 */
import React from "react";
import { Input } from "@alicloud/console-components";

const titleStyle = {
  margin: "4px 0 4px",
  color: "#1D1D1F",
  height: 20,
};

const contentStyle = {
  display: "grid",
  gridTemplateColumns: "repeat(2, 1fr)",
  gap: 36,
};

export default () => {
  return (
    <div style={contentStyle}>
      <div>
        <div style={titleStyle}>默认</div>
        <Input placeholder="请输入内容" size="medium" />
      </div>
      <div>
        <div style={titleStyle}>输入完成</div>
        <Input
          defaultValue="已输入文本"
          placeholder="请输入内容"
          size="medium"
        />
      </div>
      <div>
        <div style={titleStyle}>禁用</div>
        <Input placeholder="请输入内容" size="medium" disabled />
      </div>
      <div>
        <div style={titleStyle}>输入错误或未填</div>
        <Input placeholder="请输入内容" size="medium" defaultValue="已输入文本" state="error" />
      </div>
    </div>
  );
};


