mirror of
https://github.com/vercel/commerce.git
synced 2025-09-09 09:20:16 +00:00
.github
.vscode
app
components
breadcrumb
cart
engine-sizes
filters
form
grid
home-page
about.tsx
button-link.tsx
manufacturers.tsx
why-choose.tsx
icons
layout
manufacturers-grid
orders
page
plp
product
profile
transmission-codes
ui
banner.tsx
display-tabs.tsx
divider.tsx
faq.tsx
hero-icon.tsx
hero.tsx
loading-dots.tsx
logo-square.tsx
opengraph-image.tsx
price.tsx
prose.tsx
side-dialog.tsx
spinner.tsx
states-combobox.tsx
tag.tsx
tooltip.tsx
contexts
fonts
hooks
lib
public
.env.example
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
README.md
license.md
middleware.ts
next.config.js
package.json
pnpm-lock.yaml
postcss.config.js
prettier.config.js
tailwind.config.js
tsconfig.json
19 lines
533 B
TypeScript
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;
|