mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 03:29:59 +08:00
667 B
667 B
order | title | ||||
---|---|---|---|---|---|
3 |
|
zh-CN
自定义间距大小。
en-US
Custom spacing size.
import { Button, Slider, Space } from 'antd';
import React, { useState } from 'react';
const App: React.FC = () => {
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 App;