21 lines
No EOL
503 B
TypeScript
21 lines
No EOL
503 B
TypeScript
import styles from "./styles.module.scss"
|
|
import { StaticImageData } from 'next/image'
|
|
import Link from 'next/link'
|
|
|
|
export type ImageCardProps = {
|
|
src: string | StaticImageData,
|
|
title: string,
|
|
href: string
|
|
}
|
|
|
|
export const ImageCard = ({src, title, href}: ImageCardProps) => {
|
|
return (
|
|
<Link href={href}>
|
|
<div className={styles.container} style={{ backgroundImage: `url(${src})` }}>
|
|
<div className={styles.title}>
|
|
{title}
|
|
</div>
|
|
</div>
|
|
</Link>
|
|
)
|
|
} |