Skip to content

Commit f742d66

Browse files
committed
TimelineRow Added
1 parent 709ed6b commit f742d66

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { Box, Flex, Icon, Text, useColorModeValue } from '@chakra-ui/react';
2+
import React from 'react';
3+
4+
export default function TimelineRow(props) {
5+
const { logo, title, date, color, index, arrLength } = props;
6+
const textColor = useColorModeValue('gray.700', 'white.300');
7+
const bgIconColor = useColorModeValue('white.300', 'gray.700');
8+
9+
return (
10+
<Flex alignItems='center' minH='78px' justifyContent='start' mb='5px'>
11+
<Flex direction='column' h='100%'>
12+
<Icon
13+
as={logo}
14+
bg={bgIconColor}
15+
color={color}
16+
h={'30px'}
17+
w={'26px'}
18+
pe='6px'
19+
zIndex='1'
20+
position='relative'
21+
right={document.documentElement.dir === 'rtl' ? '-8px' : ''}
22+
left={document.documentElement.dir === 'rtl' ? '' : '-8px'}
23+
/>
24+
<Box w='2px' bg='gray.200' h={index === arrLength - 1 ? '15px' : '100%'} />
25+
</Flex>
26+
<Flex direction='column' justifyContent='flex-start' h='100%'>
27+
<Text fontSize='sm' color={textColor} fontWeight='bold'>
28+
{title}
29+
</Text>
30+
<Text fontSize='sm' color='gray.400' fontWeight='normal'>
31+
{date}
32+
</Text>
33+
</Flex>
34+
</Flex>
35+
);
36+
}

0 commit comments

Comments
 (0)