1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01:00
.profile/components/Portfolio/PortfolioItem.tsx

42 lines
1.2 KiB
TypeScript
Raw Normal View History

import { ShadowContainer } from 'components/design/ShadowContainer'
2021-04-18 01:56:23 +02:00
import Image from 'next/image'
export interface PortfolioItemProps {
title: string
description: string
link: string
image: string
}
export const PortfolioItem: React.FC<PortfolioItemProps> = (props) => {
2021-04-18 01:56:23 +02:00
const { title, description, link, image } = props
return (
<ShadowContainer className='cursor-pointer relative items-center sm:ml-10'>
<a
className='group inline-flex justify-center'
target='_blank'
rel='noopener noreferrer'
href={link}
aria-label={title}
>
<div className='flex justify-center'>
<Image
className='transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5'
width={300}
height={300}
src={image}
alt={title}
/>
</div>
<div className='opacity-0 transition-opacity duration-500 h-auto absolute text-center overflow-hidden bottom-0 group-hover:opacity-100'>
<h3 className='text-yellow text-xl font-semibold my-6 dark:text-yellow-dark'>
{title}
</h3>
<p className='my-6'>{description}</p>
</div>
</a>
</ShadowContainer>
2021-04-18 01:56:23 +02:00
)
}