myprojectpackageprav
Version:
My package in npm
24 lines • 5.72 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = tslib_1.__importDefault(require("react"));
var input_label_1 = tslib_1.__importDefault(require("./input-label"));
var InputCheck = function (inputProps) {
var _a, _b, _c, _d, _e;
var changefun = function (e) {
if ((inputProps === null || inputProps === void 0 ? void 0 : inputProps.type) === 'Radio')
inputProps === null || inputProps === void 0 ? void 0 : inputProps.changeRadio(e, inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.changeID);
};
return (react_1.default.createElement(react_1.default.Fragment, null,
react_1.default.createElement("div", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.formClassName },
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.label) && react_1.default.createElement(input_label_1.default, { labelProps: { htmlFor: inputProps === null || inputProps === void 0 ? void 0 : inputProps.id }, label: inputProps === null || inputProps === void 0 ? void 0 : inputProps.label, className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className, isbadge: inputProps === null || inputProps === void 0 ? void 0 : inputProps.badgecount, badge: inputProps === null || inputProps === void 0 ? void 0 : inputProps.badge, infoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.info, isinfoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isInfo, isinfoClassName: inputProps === null || inputProps === void 0 ? void 0 : inputProps.tooltip, isinfoIcon: inputProps === null || inputProps === void 0 ? void 0 : inputProps.infoIcon, mandatory: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isMandatory }),
react_1.default.createElement("input", { inline: true, name: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.name, label: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.label, mandatory: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.isMandatory, infoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.info, isinfoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.isInfo, id: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.id, value: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.value, onChange: changefun, disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.disabled, readOnly: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.readonly,
//checked={inputProps?.inputProps?.checked}
className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className, style: inputProps.style, "aria-label": (inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps['aria-label']) || (inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.label), "aria-required": inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.isMandatory, size: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.size) || 'sm', type: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.type) || 'check', placeholder: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.placeholder }),
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.label) && react_1.default.createElement(input_label_1.default, { labelProps: { htmlFor: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.id }, label: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.label, className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.className, isbadge: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _a === void 0 ? void 0 : _a.badgecount, badge: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _b === void 0 ? void 0 : _b.badge, infoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.info, isinfoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.isInfo, isinfoIcon: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.infoIcon, isinfoClassName: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.tooltip, mandatory: inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps.isMandatory }),
((_c = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _c === void 0 ? void 0 : _c.mandatory) && react_1.default.createElement("span", { className: "mandatory" }, "*"),
" ",
((_d = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _d === void 0 ? void 0 : _d.isInfo) && react_1.default.createElement("span", { "tip-data": (_e = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _e === void 0 ? void 0 : _e.info }, (inputProps === null || inputProps === void 0 ? void 0 : inputProps.icon) && react_1.default.createElement("span", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.icon })))));
};
exports.default = InputCheck;
//# sourceMappingURL=input-checkbox.js.map