mirror of
https://github.com/vercel/commerce.git
synced 2025-06-28 01:11:24 +00:00
28 lines
879 B
TypeScript
28 lines
879 B
TypeScript
import { AddToCart } from 'components/cart/add-to-cart';
|
|
import Price from 'components/price';
|
|
import Prose from 'components/prose';
|
|
import { Product } from 'lib/woocomerce/models/product';
|
|
|
|
export function ProductDescription({ product }: { product: Product }) {
|
|
return (
|
|
<>
|
|
<div className="mb-6 flex flex-col border-b pb-6 dark:border-neutral-700">
|
|
<h1 className="mb-2 text-5xl font-medium">{product.name}</h1>
|
|
<div className="mr-auto w-auto rounded-full bg-blue-600 p-2 text-sm text-white">
|
|
<Price
|
|
amount={product.price}
|
|
currencyCode='EUR'
|
|
/>
|
|
</div>
|
|
</div>
|
|
{product.description ? (
|
|
<Prose
|
|
className="mb-6 text-sm leading-tight dark:text-white/[60%]"
|
|
html={product.description}
|
|
/>
|
|
) : null}
|
|
<AddToCart product={product} />
|
|
</>
|
|
);
|
|
}
|