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 __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)
            t[p[i]] = s[p[i]];
    return t;
};
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 Placeholder_1 = require("atoms/Placeholder");
const styled_1 = require("./styled");
/**
 * render payment card icon
 */
function renderPaymentCardIcon(props) {
    return (react_1.default.createElement(styled_1.PaymentCardIcon, null,
        react_1.default.createElement(Placeholder_1.ImagePlaceholder, { width: 76, height: 48 })));
}
exports.renderPaymentCardIcon = renderPaymentCardIcon;
/**
 * render payment card title / number
 */
function renderPaymentCardTitle(props) {
    return react_1.default.createElement(Placeholder_1.TextPlaceholder, { width: '80%' });
}
exports.renderPaymentCardTitle = renderPaymentCardTitle;
/**
 * render payment expiry date
 */
function renderPaymentCardExpiry(props) {
    return react_1.default.createElement(Placeholder_1.TextPlaceholder, { width: '60%' });
}
exports.renderPaymentCardExpiry = renderPaymentCardExpiry;
/**
 * render payment method type
 */
function renderPaymentMethod(props) {
    return (react_1.default.createElement(styled_1.DefaultPaymentOption, null,
        react_1.default.createElement(Placeholder_1.CirclePlaceholder, { width: 24, height: 24 }),
        react_1.default.createElement(Placeholder_1.TextPlaceholder, { width: '60%' })));
}
exports.renderPaymentMethod = renderPaymentMethod;
/**
 * render payment balance
 */
function renderGiftCardBalance(props) {
    return react_1.default.createElement(Placeholder_1.TextPlaceholder, { width: '60%' });
}
exports.renderGiftCardBalance = renderGiftCardBalance;
/**
 * render edit button
 */
function renderPaymentCardToggleButton(props) {
    return react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { width: 162 });
}
exports.renderPaymentCardToggleButton = renderPaymentCardToggleButton;
/**
 * render remove button
 */
function renderPaymentRemoveButton(props) {
    return react_1.default.createElement(Placeholder_1.RectanglePlaceholder, null);
}
exports.renderPaymentRemoveButton = renderPaymentRemoveButton;
/**
 * Render Payment Edit Header
 */
function renderPaymentCardHeader(props) {
    const { renderPaymentCardToggleButton, renderPaymentCardIcon, renderPaymentCardTitle, renderPaymentCardExpiry, renderGiftCardBalance } = props, remainingProps = __rest(props, ["renderPaymentCardToggleButton", "renderPaymentCardIcon", "renderPaymentCardTitle", "renderPaymentCardExpiry", "renderGiftCardBalance"]);
    return (react_1.default.createElement(styled_1.PaymentEditHeader, null,
        react_1.default.createElement(styled_1.PaymentDetailsWrapper, null,
            renderPaymentCardIcon(remainingProps),
            react_1.default.createElement(styled_1.PaymentCardDetail, null,
                renderPaymentCardTitle(remainingProps),
                renderPaymentCardExpiry(remainingProps))),
        renderGiftCardBalance(remainingProps),
        react_1.default.createElement(styled_1.PaymentEditButton, null, renderPaymentCardToggleButton(remainingProps))));
}
exports.renderPaymentCardHeader = renderPaymentCardHeader;
/**
 * Render Payment Edit Footer
 */
function renderPaymentCardFooter(props) {
    const { renderPaymentMethod, renderPaymentRemoveButton } = props, remainingProps = __rest(props, ["renderPaymentMethod", "renderPaymentRemoveButton"]);
    return (react_1.default.createElement(styled_1.PaymentEditFooter, null,
        renderPaymentMethod(remainingProps),
        react_1.default.createElement(styled_1.PaymentRemoveButton, null, renderPaymentRemoveButton(remainingProps))));
}
exports.renderPaymentCardFooter = renderPaymentCardFooter;
/**
 * Render Wrapper
 */
function renderWrapper(props) {
    const { className, children } = props;
    return (react_1.default.createElement(styled_1.PaymentEditCardWrapper, { className: className }, children));
}
exports.renderWrapper = renderWrapper;
//# sourceMappingURL=renderProps.js.map