ant-design/components/space/demo/customize.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

698 B

order title
3
zh-CN en-US
自定义尺寸 Customize Size

zh-CN

自定义间距大小。

en-US

Custom spacing size.

import React, { useState } from 'react';
import { Space, Slider, Button } from 'antd';

function SpaceCutomizeSize() {
  const [size, setSize] = useState(8);

  return (
    <>
      <Slider value={size} onChange={value => setSize(value)} />
      <br />
      <br />
      <Space size={size}>
        <Button type="primary">Primary</Button>
        <Button>Default</Button>
        <Button type="dashed">Dashed</Button>
        <Button type="link">Link</Button>
      </Space>
    </>
  );
}

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