1
0
mirror of https://github.com/vercel/commerce.git synced 2025-08-15 05:11:22 +00:00
Files
commerce/components/home-page/button-link.tsx
2024-06-09 12:30:18 +07:00

19 lines
533 B
TypeScript

import Image from 'next/image';
import Link from 'next/link';
const ButtonLink = ({ link }: { link: { text: string; url: string } }) => {
return (
<Link href={link.url} className="relative w-fit px-5 py-2 text-white">
<Image
src="/background.svg"
alt="button background"
className="absolute inset-0 -z-10 h-full w-full rounded object-cover"
fill
/>
<div className="text-sm font-medium leading-5 tracking-wide">{link.text}</div>
</Link>
);
};
export default ButtonLink;