ant-design/components/space/demo/customize.md
二货机器人 7e9fe271ed
feat: Space support align (#23306)
* support align

* update demo & snapshot

* update comment

* update docs

* Update components/space/index.en-US.md

Co-Authored-By: 骗你是小猫咪 <darryshaw@gmail.com>

* update doc

Co-authored-by: 骗你是小猫咪 <darryshaw@gmail.com>
2020-04-16 12:28:04 +08:00

700 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 SpaceCustomizeSize() {
  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(<SpaceCustomizeSize />, mountNode);