ant-design/components/grid/demo/responsive-flex.tsx

25 lines
473 B
TypeScript
Raw Normal View History

2024-01-23 17:23:58 +08:00
import React from 'react';
import { Col, Row } from 'antd';
const App: React.FC = () => (
<Row>
{new Array(10).fill(0).map((_, index) => {
const key = `col-${index}`;
return (
<Col
key={key}
xs={{ flex: '100%' }}
sm={{ flex: '50%' }}
md={{ flex: '40%' }}
lg={{ flex: '20%' }}
xl={{ flex: '10%' }}
>
Col
</Col>
);
})}
</Row>
);
export default App;