wip: Saving work

This commit is contained in:
Sol Irvine
2023-08-20 09:55:09 +09:00
parent 097cb83568
commit 6de73e3ff2
13 changed files with 172 additions and 92 deletions

View File

@@ -1,31 +1,15 @@
import { AddToCart } from 'components/cart/add-to-cart';
import Price from 'components/price';
import Prose from 'components/prose';
import { Product } from 'lib/shopify/types';
import { VariantSelector } from './variant-selector';
export function ProductDescription({ product }: { product: Product }) {
return (
<>
<div className="mb-6 flex flex-col border-b border-white/20 pb-6">
<h1 className="font-multilingual mb-2 text-5xl">{product.title}</h1>
<div className="font-multilingual mr-auto w-auto text-lg text-white">
<Price
amount={product.priceRange.maxVariantPrice.amount}
currencyCode={product.priceRange.maxVariantPrice.currencyCode}
/>
</div>
</div>
<VariantSelector options={product.options} variants={product.variants} />
{product.descriptionHtml ? (
<Prose
className="mb-6 text-lg leading-tight dark:text-white/[60%]"
html={product.descriptionHtml}
/>
) : null}
<AddToCart variants={product.variants} availableForSale={product.availableForSale} />
</>
);
}