From 3db8ad4074f72aaf1bbd27b35741f5f13316ddca Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Mon, 24 Jul 2023 14:26:07 -0500 Subject: [PATCH] Adds dynamic product label font size (#1099) --- app/product/[handle]/page.tsx | 3 +-- app/search/[collection]/page.tsx | 2 +- app/search/page.tsx | 2 +- components/carousel.tsx | 3 +-- components/grid/three-items.tsx | 4 ++-- components/grid/tile.tsx | 21 +++++++++----------- components/label.tsx | 25 ++++++------------------ components/layout/product-grid-items.tsx | 3 +-- components/price.tsx | 3 ++- package.json | 1 + pnpm-lock.yaml | 11 +++++++++++ tailwind.config.js | 2 +- 12 files changed, 37 insertions(+), 43 deletions(-) diff --git a/app/product/[handle]/page.tsx b/app/product/[handle]/page.tsx index f23c0cc4c..828973071 100644 --- a/app/product/[handle]/page.tsx +++ b/app/product/[handle]/page.tsx @@ -125,8 +125,7 @@ async function RelatedProducts({ id }: { id: string }) { > {`No products found in this collection`}

) : ( - + )} diff --git a/app/search/page.tsx b/app/search/page.tsx index 354a2022f..5f4b60c01 100644 --- a/app/search/page.tsx +++ b/app/search/page.tsx @@ -32,7 +32,7 @@ export default async function SearchPage({

) : null} {products.length > 0 ? ( - + ) : null} diff --git a/components/carousel.tsx b/components/carousel.tsx index 408e24e4f..d67ba5deb 100644 --- a/components/carousel.tsx +++ b/components/carousel.tsx @@ -19,8 +19,7 @@ export async function Carousel() { > ) { return ( @@ -24,7 +22,7 @@ export function GridTileImage({ className={clsx( 'flex h-full w-full items-center justify-center overflow-hidden rounded-lg border bg-white hover:border-blue-600 dark:bg-black', { - relative: labels, + relative: label, 'border-2 border-blue-600': active, 'border-neutral-200 dark:border-neutral-800': !active } @@ -39,13 +37,12 @@ export function GridTileImage({ {...props} /> ) : null} - {labels ? ( + {label ? (