1
0
mirror of https://github.com/kremalicious/portfolio.git synced 2025-02-14 21:10:41 +01:00
Matthias Kretschmann 7eb0075e6f
Migrate to Biome (#1322)
* migrate to Biome

* package updates

* ci fix

* typing fix
2024-07-26 11:45:20 +01:00

35 lines
717 B
TypeScript

import type { ImageType } from '@/types'
import Image from 'next/image'
import styles from './index.module.css'
export default function ProjectImage({
image,
alt,
sizes,
className,
priority = false
}: {
image: ImageType
alt: string
sizes: string
className?: string
priority?: boolean
}) {
return image ? (
<figure className={`${styles.imageWrap} ${className || null}`}>
<Image
className={styles.image}
src={image.src}
alt={alt}
width={image.width}
height={image.height}
sizes={sizes}
quality={85}
priority={priority}
placeholder="blur"
blurDataURL={image.blurDataURL}
/>
</figure>
) : null
}