mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-02 03:59:01 +08:00
6776bb8916
* docs: update demo * chore: add script * test: fix demo test * docs: convert demos * chore: move script * test: remove react-dom import * chore: update deps * docs: update riddle js * test: fix image test * docs: fix riddle demo
693 B
693 B
order | title | ||||
---|---|---|---|---|---|
3 |
|
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>
</>
);
}
export default () => <SpaceCustomizeSize />;