Repository URL to install this package:
Version:
0.9.7 ▾
|
ui-component-library
/
dist
/
components
/
abstractions
/
PaymentMethods
/
PaymentCardForm
/
renderProps.js
|
---|
"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 omit_1 = require("@skava/modules/___dist/utils/omit");
const Placeholder_1 = require("atoms/Placeholder");
const styled_1 = require("./styled");
function renderPaymentCardFormButtonSection(props) {
return (react_1.default.createElement(styled_1.PaymentCardButtonSection, null,
react_1.default.createElement(styled_1.ButtonLeftSection, null,
react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { height: 44 })),
react_1.default.createElement(styled_1.ButtonRightSection, null,
react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { height: 44 }))));
}
exports.renderPaymentCardFormButtonSection = renderPaymentCardFormButtonSection;
function renderPaymentCardMethodCheckSection(props) {
return (react_1.default.createElement(styled_1.PaymentCardMethodCheckSection, null,
react_1.default.createElement(styled_1.CardFormCheckBox, null,
react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { height: 25 })),
react_1.default.createElement(styled_1.CardFormCheckBoxLabel, null,
react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { height: 20 }))));
}
exports.renderPaymentCardMethodCheckSection = renderPaymentCardMethodCheckSection;
function LabelInputItems(width) {
return (react_1.default.createElement(styled_1.RowItems, { className: "rowitems", role: "rowitems" },
react_1.default.createElement(styled_1.CardFormLabel, null,
react_1.default.createElement(Placeholder_1.TextPlaceholder, { width: width, height: 16 })),
react_1.default.createElement(styled_1.CardFormInput, null,
react_1.default.createElement(Placeholder_1.RectanglePlaceholder, { height: 44 }))));
}
exports.LabelInputItems = LabelInputItems;
function renderPaymentCardDetailsSection(props) {
return (react_1.default.createElement(styled_1.Row, null,
react_1.default.createElement(styled_1.PaymentCardDetailsSection, null,
react_1.default.createElement(styled_1.CardNumberSection, null, LabelInputItems(70)),
react_1.default.createElement(styled_1.MonthSection, null, LabelInputItems(30)),
react_1.default.createElement(styled_1.YearSection, null, LabelInputItems(30)),
react_1.default.createElement(styled_1.SecuritySection, null, LabelInputItems(50)))));
}
exports.renderPaymentCardDetailsSection = renderPaymentCardDetailsSection;
function renderPaymentCardFormNameSection(props) {
return (react_1.default.createElement(styled_1.Row, null,
react_1.default.createElement(styled_1.PaymentCardFormNameSection, null,
LabelInputItems(120),
LabelInputItems(120))));
}
exports.renderPaymentCardFormNameSection = renderPaymentCardFormNameSection;
function renderPaymentCardFormContainer(props) {
const OmitProps = omit_1.omit(props, [
'renderPaymentCardFormNameSection',
'renderPaymentCardDetailsSection',
'renderPaymentCardMethodCheckSection',
'renderPaymentCardFormButtonSection',
]);
const renderPaymentCardFormName = props.renderPaymentCardFormNameSection(OmitProps);
const renderPaymentCardDetails = props.renderPaymentCardDetailsSection(OmitProps);
const renderPaymentCardMethodCheck = props.renderPaymentCardMethodCheckSection(OmitProps);
const renderPaymentCardFormButton = props.renderPaymentCardFormButtonSection(OmitProps);
return (react_1.default.createElement(styled_1.PaymentCardFormContainer, null,
renderPaymentCardFormName,
renderPaymentCardDetails,
renderPaymentCardMethodCheck,
renderPaymentCardFormButton));
}
exports.renderPaymentCardFormContainer = renderPaymentCardFormContainer;
function renderPaymentCardFormWrapper(props) {
const { className, children } = props;
return (react_1.default.createElement(styled_1.PaymentCardFormWrapper, { className: className }, children));
}
exports.renderPaymentCardFormWrapper = renderPaymentCardFormWrapper;
//# sourceMappingURL=renderProps.js.map