myprojectpackageprav
Version:
My package in npm
17 lines • 3.22 kB
JavaScript
import React from 'react';
import InputLabel from './input-label';
import { SELECT_MESSAGE } from '../constants/rhybusconfig';
var InputSelect = function (inputProps) {
var _a, _b, _c, _d, _e, _f, _g;
return (React.createElement(React.Fragment, null,
React.createElement("div", { className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.formClassName },
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.label) && React.createElement(InputLabel, { labelProps: { htmlFor: (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _a === void 0 ? void 0 : _a.id }, label: inputProps === null || inputProps === void 0 ? void 0 : inputProps.label, className: (_b = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _b === void 0 ? void 0 : _b.className, infoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.info, isinfoLabel: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isInfo, isinfoIcon: inputProps === null || inputProps === void 0 ? void 0 : inputProps.infoIcon, isinfoClassName: inputProps === null || inputProps === void 0 ? void 0 : inputProps.infoClassName, mandatory: inputProps === null || inputProps === void 0 ? void 0 : inputProps.isMandatory }),
React.createElement("select", { name: (_c = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _c === void 0 ? void 0 : _c.name, id: (_d = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _d === void 0 ? void 0 : _d.id, value: (_e = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _e === void 0 ? void 0 : _e.value, placeholder: (_f = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _f === void 0 ? void 0 : _f.placeholder, onChange: inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange, disabled: inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, readOnly: inputProps === null || inputProps === void 0 ? void 0 : inputProps.readonly, className: inputProps === null || inputProps === void 0 ? void 0 : inputProps.className, style: inputProps === null || inputProps === void 0 ? void 0 : inputProps.style, "aria-label": inputProps['aria-label'] || (inputProps === null || inputProps === void 0 ? void 0 : inputProps.label), "aria-required": inputProps === null || inputProps === void 0 ? void 0 : inputProps.isMandatory, size: ((_g = inputProps === null || inputProps === void 0 ? void 0 : inputProps.inputProps) === null || _g === void 0 ? void 0 : _g.size) || 'sm', type: (inputProps === null || inputProps === void 0 ? void 0 : inputProps.type) || 'text' },
React.createElement("option", null, "Select")),
React.createElement("p", { className: 'errormsg d-none' },
SELECT_MESSAGE,
" ",
(inputProps === null || inputProps === void 0 ? void 0 : inputProps.label) || inputProps['aria-label']))));
};
export default InputSelect;
//# sourceMappingURL=input-select.js.map