import React, { memo } from "react"; import ColorChips from "../../ColorChips"; import PickLabel from "../../PickLabel"; import { Caret } from "../../UI/Icon"; import Text from "../../UI/Text"; import Link from "../../shared/Link"; import { IProductCompareTableHighlightedTableProps } from "./ProductCompareTable.types"; const ProductCompareTableHighlightedTable = ({ parentCategory, productCategory, productMap, productModelNameList, specCategoryNameList, showProductInforamtionRow, highlightedProductModelName, highlightedSpecName, Image, NewTabLink, }: IProductCompareTableHighlightedTableProps) => { return (
|
|
{productModelNameList.map((modelName) => {
if (!productMap[modelName]) {
return;
}
const isColumnHighlighted =
highlightedProductModelName === modelName;
const {
pickType,
imageUrl,
specCategoryMap,
showDetailButton = true,
} = productMap[modelName];
return (
{Image ? (
|
);
})}
|
|
{productModelNameList.map((modelName) => {
if (!productMap[modelName]) {
return;
}
const { specCategoryMap } = productMap[modelName];
if (!specCategoryMap[specCategoryName]) {
return;
}
const { value, unit, prefix, postfix } = specCategoryMap[
specCategoryName
];
const isColHighlighted =
highlightedProductModelName === modelName;
const isLastRow = specCategoryNameList.length - 1 === index;
return (
<>
{specCategoryName === "색상" ? (
|
>
);
})}