import React from 'react';
import { Input, Row, Col, Form } from '@btri-ui/base';
import { Checkbox } from '@btri-ui/base';
import { Button } from '@btri-ui/base';

export default () => {
  const onFinish = (values: any) => {
    console.log('Success:', values);
  };

  const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
  };
  return (
    <div>
      <Row autoMode={true}>
        <Col span={8}>
          <Form
            name="basic"
            initialValues={{ remember: true }}
            onFinish={onFinish}
            onFinishFailed={onFinishFailed}
            autoComplete="off"
            size="large"
          >
            <Form.Item
              name="username"
              rules={[{ required: true, message: '请输入账号!' }]}
            >
              <Input placeholder="请输入账号" style={{ width: '100%' }} />
            </Form.Item>

            <Form.Item
              name="password"
              rules={[{ required: true, message: '请输入密码!' }]}
              style={{ marginBottom: '30px' }}
            >
              <Input.Password
                placeholder="请输入密码"
                style={{ width: '100%' }}
              />
            </Form.Item>

            <Form.Item wrapperCol={{ span: 24 }}>
              <Button type="primary" htmlType="submit" block size="large">
                登录
              </Button>
            </Form.Item>
          </Form>
        </Col>
      </Row>
    </div>
  );
};
