File size: 726 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
/* 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;
|