File size: 1,800 Bytes
f5071ca |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
import { Heading, Link, Text, useColorModeValue } from '@chakra-ui/react';
import React, { useEffect } from 'react';
import Card from './Card';
const Socials = ({ socialName, address, href, onClick }) => {
return (
<Text>
{socialName}:{' '}
<Link
as='a'
cursor='pointer'
color={useColorModeValue('light.primary', 'dark.primary')}
_hover={{
color: useColorModeValue(
'light.headingHover',
'dark.headingHover'
),
}}
href={href}
onClick={onClick}
target='blank'
mb='1rem'
display='inline-block'
>
{address}
</Link>
</Text>
);
};
const Contact = () => {
// scroll top
useEffect(() => window.scrollTo(0, 0), []);
return (
<Card>
<Heading fontSize={{ base: '1.7rem', md: '2.5rem' }} mb='1.5rem'>
Contacts
</Heading>
<Text mb='1rem'>DEV Community π©βπ»π¨βπ» would love to hear from you!</Text>
<Socials
socialName='Email'
address='zwelhtetyandev@gmail.com'
onClick={() => window.open(`mailto:zwelhtetyandev@gamil.com`)}
/>
<Socials
socialName='Github'
address='@zwelhtetyan'
href='https://github.com/zwelhtetyan'
/>
<Socials
socialName='Linkedin'
address='@zwelhtetyan'
href='https://www.linkedin.com/in/zwelhtetyan/'
/>
<Socials
socialName='Twitter'
address='@zwelhtetyan'
href='https://twitter.com/ZwelHtetYan2'
/>
</Card>
);
};
export default Contact;
|