ant-design/components/space/demo/wrap.tsx
lijianan a5e7c4e849
refactor: use Array.from() instead new Array() (#52792)
* refactor: use Array.from() instead new Array()

* chore: fix

* chore: fix
2025-02-14 10:16:15 +08:00

14 lines
322 B
TypeScript

import React from 'react';
import { Button, Space } from 'antd';
const App: React.FC = () => (
<Space size={[8, 16]} wrap>
{Array.from({ length: 20 }).map((_, index) => (
// eslint-disable-next-line react/no-array-index-key
<Button key={index}>Button</Button>
))}
</Space>
);
export default App;