Repository URL to install this package:
|
Version:
2.7.6 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib");
const react_1 = tslib_1.__importDefault(require("react"));
const renderProps_1 = require("./renderProps");
const styled_1 = require("./styled");
class PaymentSummary extends react_1.default.PureComponent {
render() {
const _a = this.props,
{
renderWrapper,
renderContainer,
renderButtons,
renderForm,
shouldHideActionButtons
} = _a,
remainingProps = tslib_1.__rest(_a, ["renderWrapper", "renderContainer", "renderButtons", "renderForm", "shouldHideActionButtons"]);
const paymentSummaryView = renderContainer(remainingProps); // @@dom-garbage
const actionButtonsView = react_1.default.createElement(styled_1.StyledActionButtonGroup, {
renderDefaultView: renderButtons,
renderActiveView: renderForm
});
const children = react_1.default.createElement(react_1.default.Fragment, null, paymentSummaryView, actionButtonsView);
const view = renderWrapper(Object.assign({}, remainingProps, {
shouldHideActionButtons,
children
}));
return view;
}
}
PaymentSummary.defaultProps = {
className: '',
// shouldHideActionButtons: false,
/**
* registering render props
*/
renderShippingAddress: renderProps_1.defaultRenderShippingAddress,
renderShippingMethod: renderProps_1.defaultRenderShippingMethod,
renderPaymentMethod: renderProps_1.defaultRenderPaymentMethod,
renderOrderSummary: renderProps_1.defaultRenderOrderSummary,
renderContainer: renderProps_1.defaultRenderContainer,
renderWrapper: renderProps_1.defaultRenderWrapper
};
exports.PaymentSummary = PaymentSummary;
exports.default = PaymentSummary; //# sourceMappingURL=PaymentSummary.js.map