/**
 * title: "段落输入框"
 * description: "通过 size 属性设置输入框的大小，对单行输入框有效。"
 */
import React from 'react';
import { Input } from '@alicloud/console-components';

const { TextArea } = Input;

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>
        <TextArea placeholder="请输入内容" size="medium" />
      </div>
      <div>
        <div style={titleStyle}>输入完成</div>
        <TextArea
          defaultValue="已输入文本"
          placeholder="请输入内容"
          size="medium"
        />
      </div>
      <div>
        <div style={titleStyle}>禁用</div>
        <TextArea placeholder="请输入内容" size="medium" disabled />
      </div>
      <div>
        <div style={titleStyle}>输入错误或未填</div>
        <TextArea
          placeholder="请输入内容"
          defaultValue="已输入文本"
          size="medium"
          state="error"
        />
      </div>
    </div>
  );
};


