2021-04-18 01:56:23 +02:00
|
|
|
import Image from 'next/image'
|
|
|
|
|
|
|
|
import { skills } from './skills'
|
|
|
|
|
|
|
|
export interface SkillProps {
|
|
|
|
skill: keyof typeof skills
|
|
|
|
}
|
|
|
|
|
2021-05-08 19:52:04 +02:00
|
|
|
export const Skill: React.FC<SkillProps> = (props) => {
|
2021-04-18 01:56:23 +02:00
|
|
|
const { skill } = props
|
|
|
|
const skillProperties = skills[skill]
|
|
|
|
|
|
|
|
return (
|
2021-05-08 19:52:04 +02:00
|
|
|
<a
|
|
|
|
href={skillProperties.link}
|
|
|
|
className='mx-2 max-w-xl text-yellow hover:underline dark:text-yellow-dark'
|
|
|
|
target='_blank'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
>
|
|
|
|
<div className='text-center'>
|
|
|
|
<Image width={60} height={60} alt={skill} src={skillProperties.image} />
|
|
|
|
<p className='mt-1'>{skill}</p>
|
|
|
|
</div>
|
|
|
|
</a>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|