hh-ui-components
Version:
14 lines • 957 B
JavaScript
import React from "react";
import ColorSingle from "./ColorSingle";
import ColorMore from "./ColorMore";
var Color = function (_a) {
var colors = _a.colors, color = _a.color, setDetail = _a.setDetail, handle = _a.handle, collectionHandle = _a.collectionHandle;
return (React.createElement("div", { className: "-ml-[3px] flex items-center space-x-[4px] lg:space-x-[4px] 2xl:space-x-[0.278vw]" },
colors &&
colors.map(function (item, index) {
return index <= 3 && (React.createElement(ColorSingle, { key: index, color: item.color, active: item.label === color, className: "", onClick: function () { return ""; }, isWhite: item.isWhite }));
}),
React.createElement("div", { className: "hidden lg:block" }, colors && colors.length >= 4 ? (React.createElement(ColorMore, { label: "+ more!", href: "/products/".concat(handle) })) : (""))));
};
export default Color;
//# sourceMappingURL=Color.js.map