From 8bb50a453027e3628a27de579f4414be7eb0c605 Mon Sep 17 00:00:00 2001 From: druzydowns Date: Sat, 1 Jun 2024 10:24:59 -0400 Subject: [PATCH] edit product card layout --- app/product/[handle]/page.tsx | 6 ++-- components/product/productDescriptionCard.tsx | 35 +++++++++++++++++++ tailwind.config.js | 6 +++- 3 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 components/product/productDescriptionCard.tsx diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index 31de2910a..47707f365 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -5,7 +5,7 @@ import { Suspense } from 'react'; import { GridTileImage } from 'components/grid/tile'; import Footer from 'components/layout/footer'; import { Gallery } from 'components/product/gallery'; -import { ProductDescription } from 'components/product/product-description'; +import { ProductDescriptionCard } from 'components/product/productDescriptionCard'; import { HIDDEN_PRODUCT_TAG } from 'lib/constants'; import { getProduct, getProductRecommendations } from 'lib/shopify'; import { Image } from 'lib/shopify/types'; @@ -82,7 +82,7 @@ export default async function ProductPage({ params }: { params: { handle: string }} />
-
+
({ @@ -93,7 +93,7 @@ export default async function ProductPage({ params }: { params: { handle: string
- +
diff --git a/components/product/productDescriptionCard.tsx b/components/product/productDescriptionCard.tsx new file mode 100644 index 000000000..294518908 --- /dev/null +++ b/components/product/productDescriptionCard.tsx @@ -0,0 +1,35 @@ +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 ProductDescriptionCard({ product }: { product: Product }) { + return ( +
+
+

{product.title}

+
+
+
+
+ +
+
+ + + {product.descriptionHtml ? ( + + ) : null} + + +
+
+ ); +} diff --git a/tailwind.config.js b/tailwind.config.js index 128baa502..8312f85a8 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -28,9 +28,13 @@ module.exports = { fadeIn: 'fadeIn .3s ease-in-out', carousel: 'marquee 60s linear infinite', blink: 'blink 1.4s both infinite' - } + }, } }, + corePlugins: { + // Disable the dark mode variant for all utilities + darkMode: false, + }, future: { hoverOnlyWhenSupported: true },