import Link from 'next/link' import { motion, useMotionTemplate, useMotionValue } from 'framer-motion' import { GridPattern } from '@/components/GridPattern' import { Heading } from '@/components/Heading' function TilePattern({ mouseX, mouseY }) { let maskImage = useMotionTemplate`radial-gradient(180px at ${mouseX}px ${mouseY}px, white, transparent)` let style = { maskImage, WebkitMaskImage: maskImage } return (
) } /** * Generic Tiles component for displaying a grid of tile items * * @param {string} title - The heading title for the tiles section * @param {string} [id] - Optional id for the heading anchor * @param {string} [description] - Optional description text to display below the title * @param {Array<{href: string, name: string, description: string}>} items - Array of tile items * @param {string} [buttonText='Read more'] - Optional button text (defaults to "Read more") */ export function Tiles({ title, id, description, items, buttonText = 'Read more' }) { const hasHeader = title || description; return (
{title && ( {title} )} {description && (
{description}
)}
{items.map((item) => { let mouseX = useMotionValue(0) let mouseY = useMotionValue(0) function onMouseMove({ currentTarget, clientX, clientY }) { let { left, top } = currentTarget.getBoundingClientRect() mouseX.set(clientX - left) mouseY.set(clientY - top) } return (

{item.name}

{item.description}

) })}
) }