add hover state to tile

This commit is contained in:
StephDietz 2023-07-13 12:07:05 -05:00
parent 5e2035d70c
commit abf511fede
2 changed files with 4 additions and 0 deletions

View File

@ -7,11 +7,13 @@ export function GridTileImage({
active,
labelPosition,
labels,
hoverBorder,
...props
}: {
isInteractive?: boolean;
active?: boolean;
labelPosition?: 'bottom' | 'center';
hoverBorder?: boolean;
labels?: {
title: string;
amount: string;
@ -26,6 +28,7 @@ export function GridTileImage({
active !== undefined && active
? 'border-2 border-blue-600'
: 'border-gray-200 dark:border-gray-800',
hoverBorder && 'hover:border-blue-600',
{
relative: labels
}

View File

@ -17,6 +17,7 @@ export default function ProductGridItems({ products }: { products: Product[] })
amount: product.priceRange.maxVariantPrice.amount,
currencyCode: product.priceRange.maxVariantPrice.currencyCode
}}
hoverBorder={true}
src={product.featuredImage?.url}
width={600}
height={600}