1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-02-24 03:23:08 +01:00
developer-roadmap/components/dimmed-more.tsx

47 lines
1.1 KiB
TypeScript
Raw Normal View History

2021-08-14 20:29:05 +02:00
import { Box, Link, Text } from '@chakra-ui/react';
type DimmedMoreProps = {
text: string;
2021-09-01 14:45:26 +02:00
href: string;
2021-08-14 20:29:05 +02:00
};
export function DimmedMore(props: DimmedMoreProps) {
2021-09-01 14:45:26 +02:00
const { text, href } = props;
2021-08-14 20:29:05 +02:00
return (
<Box position='relative' textAlign='center' bottom='20px'>
<Box
opacity={1}
pointerEvents='none'
position='absolute'
bottom={0}
height='200px'
width='100%'
2021-09-05 21:08:28 +02:00
background='linear-gradient(180deg, rgb(255 255 255 / 40%), white)'
2021-08-14 20:29:05 +02:00
/>
<Link
rounded='20px'
display='inline'
bg='green.600'
color='white'
p='7px 20px'
2021-09-01 14:45:26 +02:00
href={href}
2021-08-14 20:29:05 +02:00
fontWeight={800}
fontSize='11px'
textTransform='uppercase'
my='25px'
position='relative'
_hover={{
textDecoration: 'none',
'& .forward-arrow': {
transform: 'translateX(3px)'
}
}}>
{text}
<Text d='inline-block' as='span' transition='200ms' ml='4px' className='forward-arrow'>&rarr;</Text>
</Link>
</Box>
);
}