mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
34 lines
726 B
TypeScript
34 lines
726 B
TypeScript
|
/* eslint-disable react/no-array-index-key */
|
||
|
import React from 'react';
|
||
|
import { Flex } from 'antd';
|
||
|
|
||
|
const App: React.FC = () => (
|
||
|
<>
|
||
|
<Flex vertical>
|
||
|
{Array.from({ length: 4 }).map((_, i) => (
|
||
|
<div
|
||
|
key={i}
|
||
|
style={{
|
||
|
height: 60,
|
||
|
backgroundColor: i % 2 ? '#1677ff' : '#1677ffbf',
|
||
|
}}
|
||
|
/>
|
||
|
))}
|
||
|
</Flex>
|
||
|
<Flex style={{ marginTop: 20 }}>
|
||
|
{Array.from({ length: 4 }).map((_, i) => (
|
||
|
<div
|
||
|
key={i}
|
||
|
style={{
|
||
|
width: '25%',
|
||
|
height: i % 2 ? 60 : 40,
|
||
|
backgroundColor: i % 2 ? '#1677ff' : '#1677ffbf',
|
||
|
}}
|
||
|
/>
|
||
|
))}
|
||
|
</Flex>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default App;
|