church-website/src/components/ImageCard/ImageCard.tsx
2025-03-24 09:47:55 +01:00

20 lines
No EOL
451 B
TypeScript

import styles from "./styles.module.scss"
import Link from 'next/link'
export type ImageCardProps = {
src: string,
title: string,
href: string
}
export const ImageCard = ({src, title, href}: ImageCardProps) => {
return (
<Link href={href}>
<div className={styles.container} style={{ backgroundImage: `url(${encodeURI(src)})` }}>
<div className={styles.title}>
{title}
</div>
</div>
</Link>
)
}