ant-design/components/space/demo/base.md
骗你是小猫咪 b8109bd20e
feat: 🆕 new Space component (#22363)
* feat: new component: Space

* add config-provider space doc

* fix lint fail

* revert test -u

* improve demo

* compatible invalidElement

* use inline-flex and wrap

* review change

* add space version

* improve classname

* review change

* review change
2020-03-22 11:38:02 +08:00

697 B

order title
0
zh-CN en-US
基本用法 Basic Usage

zh-CN

相邻组件水平间距。

en-US

Crowded components horizontal spacing.

import { Button, Space, Upload, Popconfirm } from 'antd';
import { UploadOutlined } from '@ant-design/icons';

function SpaceDemo() {
  return (
    <Space>
      Space
      <Button type="primary">Button</Button>
      <Upload>
        <Button>
          <UploadOutlined /> Click to Upload
        </Button>
      </Upload>
      <Popconfirm title="Are you sure delete this task?" okText="Yes" cancelText="No">
        <Button>Confirm</Button>
      </Popconfirm>
    </Space>
  );
}

ReactDOM.render(<SpaceDemo />, mountNode);