computer-scienceangular-roadmapbackend-roadmapblockchain-roadmapdba-roadmapdeveloper-roadmapdevops-roadmapfrontend-roadmapgo-roadmaphactoberfestjava-roadmapjavascript-roadmapnodejs-roadmappython-roadmapqa-roadmapreact-roadmaproadmapstudy-planvue-roadmapweb3-roadmap
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.1 KiB
48 lines
1.1 KiB
3 years ago
|
import { Box, Heading, Link, Text, Tooltip } from '@chakra-ui/react';
|
||
|
import { InfoIcon } from '@chakra-ui/icons';
|
||
|
|
||
|
type RoadmapGridItemProps = {
|
||
|
title: string;
|
||
|
subtitle: string;
|
||
|
isCommunity?: boolean;
|
||
3 years ago
|
colorIndex?: number;
|
||
|
url: string;
|
||
3 years ago
|
};
|
||
|
|
||
|
const bgColorList = [
|
||
|
'blue.900',
|
||
|
'red.800',
|
||
|
'green.800',
|
||
|
'teal.800',
|
||
|
'gray.800',
|
||
|
'red.900'
|
||
|
];
|
||
|
|
||
|
export function HomeRoadmapItem(props: RoadmapGridItemProps) {
|
||
3 years ago
|
const { title, subtitle, isCommunity, colorIndex = 0, url } = props;
|
||
3 years ago
|
|
||
|
return (
|
||
3 years ago
|
<Box
|
||
|
as={Link}
|
||
|
href={url}
|
||
3 years ago
|
_hover={{ textDecoration: 'none', transform: 'scale(1.02)' }}
|
||
|
flex={1}
|
||
|
shadow='2xl'
|
||
|
bg={bgColorList[colorIndex] ?? bgColorList[0]}
|
||
|
color='white'
|
||
|
p='15px'
|
||
|
rounded='10px'
|
||
|
pos='relative'
|
||
|
>
|
||
|
{isCommunity && (
|
||
|
<Tooltip label={'Community contribution'} hasArrow placement='top'>
|
||
|
<InfoIcon opacity={0.5} position='absolute' top='10px' right='10px' />
|
||
|
</Tooltip>
|
||
|
)}
|
||
|
|
||
3 years ago
|
<Heading fontSize={['17px', '17px', '22px']} mb='5px'>{title}</Heading>
|
||
3 years ago
|
<Text color='gray.200' fontSize={['13px']}>{subtitle}</Text>
|
||
|
</Box>
|
||
3 years ago
|
);
|
||
|
}
|