mirror of
https://github.com/vercel/commerce.git
synced 2025-07-01 02:41:22 +00:00
add hover state to tile
This commit is contained in:
parent
5e2035d70c
commit
abf511fede
@ -7,11 +7,13 @@ export function GridTileImage({
|
|||||||
active,
|
active,
|
||||||
labelPosition,
|
labelPosition,
|
||||||
labels,
|
labels,
|
||||||
|
hoverBorder,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
isInteractive?: boolean;
|
isInteractive?: boolean;
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
labelPosition?: 'bottom' | 'center';
|
labelPosition?: 'bottom' | 'center';
|
||||||
|
hoverBorder?: boolean;
|
||||||
labels?: {
|
labels?: {
|
||||||
title: string;
|
title: string;
|
||||||
amount: string;
|
amount: string;
|
||||||
@ -26,6 +28,7 @@ export function GridTileImage({
|
|||||||
active !== undefined && active
|
active !== undefined && active
|
||||||
? 'border-2 border-blue-600'
|
? 'border-2 border-blue-600'
|
||||||
: 'border-gray-200 dark:border-gray-800',
|
: 'border-gray-200 dark:border-gray-800',
|
||||||
|
hoverBorder && 'hover:border-blue-600',
|
||||||
{
|
{
|
||||||
relative: labels
|
relative: labels
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ export default function ProductGridItems({ products }: { products: Product[] })
|
|||||||
amount: product.priceRange.maxVariantPrice.amount,
|
amount: product.priceRange.maxVariantPrice.amount,
|
||||||
currencyCode: product.priceRange.maxVariantPrice.currencyCode
|
currencyCode: product.priceRange.maxVariantPrice.currencyCode
|
||||||
}}
|
}}
|
||||||
|
hoverBorder={true}
|
||||||
src={product.featuredImage?.url}
|
src={product.featuredImage?.url}
|
||||||
width={600}
|
width={600}
|
||||||
height={600}
|
height={600}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user