Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = __importDefault(require("react"));
const Empty_1 = require("atoms/Empty");
const words_1 = require("src/words");
const styled_1 = require("../CheckoutCartBundle/ProductItem/styled");
const styled_2 = require("./styled");
function defaultRenderCartButton() {
    return react_1.default.createElement(Empty_1.Empty, null);
}
exports.defaultRenderCartButton = defaultRenderCartButton;
function defaultRenderCartProduct(props) {
    const { item, index, productCount } = props;
    const { image, brandName, name, options, salePrice, regPrice, isBundleSubProduct, hasAddon, } = item;
    const captionBgColor = isBundleSubProduct && hasAddon ? '#EA7B0A' : '#195FBF';
    const bundleCaption = `${words_1.wording.item} ${index +
        1} of ${productCount}`;
    const caption = isBundleSubProduct && hasAddon ? words_1.wording.addon : bundleCaption;
    return (react_1.default.createElement(react_1.default.Fragment, null,
        react_1.default.createElement(styled_2.StyledImage, null,
            react_1.default.createElement(styled_1.StyledImageWithCaption, { src: image.value, caption: caption, captionColor: captionBgColor })),
        react_1.default.createElement(styled_2.ProductDetails, null,
            react_1.default.createElement(styled_2.BrandName, { breedType: "h4", content: brandName }),
            react_1.default.createElement(styled_2.ProductName, { breedType: "h4", content: name }),
            react_1.default.createElement(styled_2.ProductOptions, { list: options }),
            react_1.default.createElement(styled_2.ItemPrice, { saleprice: salePrice, regularprice: regPrice }))));
}
exports.defaultRenderCartProduct = defaultRenderCartProduct;
//# sourceMappingURL=renderProps.js.map