forked from crowetic/commerce
fix zIndex and key
This commit is contained in:
parent
6342eb21b8
commit
99ecf498fb
@ -51,7 +51,7 @@ const ProductCard: FC<Props> = ({
|
|||||||
className={cn(s.root, { [s.simple]: variant === 'simple' }, className)}
|
className={cn(s.root, { [s.simple]: variant === 'simple' }, className)}
|
||||||
>
|
>
|
||||||
<div className={s.squareBg} />
|
<div className={s.squareBg} />
|
||||||
<div className="flex flex-row justify-between box-border w-full z-10 absolute">
|
<div className="flex flex-row justify-between box-border w-full z-20 absolute">
|
||||||
<div className="absolute top-0 left-0">
|
<div className="absolute top-0 left-0">
|
||||||
<h3 className={s.productTitle}>
|
<h3 className={s.productTitle}>
|
||||||
<span>{p.name}</span>
|
<span>{p.name}</span>
|
||||||
|
@ -98,12 +98,12 @@ const ProductView: FC<Props> = ({ product, className }) => {
|
|||||||
<div className="pb-4" key={opt.displayName}>
|
<div className="pb-4" key={opt.displayName}>
|
||||||
<h2 className="uppercase font-medium">{opt.displayName}</h2>
|
<h2 className="uppercase font-medium">{opt.displayName}</h2>
|
||||||
<div className="flex flex-row py-4">
|
<div className="flex flex-row py-4">
|
||||||
{opt.values.map((v: any) => {
|
{opt.values.map((v: any, i: number) => {
|
||||||
const active = choices[opt.displayName]
|
const active = choices[opt.displayName]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Swatch
|
<Swatch
|
||||||
key={v.entityId}
|
key={`${v.entityId}-${i}`}
|
||||||
active={v.label === active}
|
active={v.label === active}
|
||||||
variant={opt.displayName}
|
variant={opt.displayName}
|
||||||
color={v.hexColors ? v.hexColors[0] : ''}
|
color={v.hexColors ? v.hexColors[0] : ''}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user