import React, { useState } from 'react';
import { Button, Row, Col, Drawer } from '@btri-ui/base';
import './index.less';

export default () => {
  const [show, setShow] = useState(false);
  const toShow = () => setShow(true);
  const toClose = () => setShow(false);
  return (
    <div>
      <Row autoMode={true}>
        <Col span={4}>
          <Button onClick={toShow}>打开抽屉</Button>
        </Col>
      </Row>
      <Drawer
        mask={false}
        title="抽屉标题"
        footer={true}
        visible={show}
        onClose={toClose}
      >
        <p className="content">抽屉的内容</p>
      </Drawer>
    </div>
  );
};
