@dock365/reform-fabric-fields
Version:
fabric fields reform
25 lines • 1.46 kB
JavaScript
;
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var React = __importStar(require("react"));
var Rating_1 = require("office-ui-fabric-react/lib/Rating");
var ErrorHandlerHOC_1 = __importDefault(require("./ErrorHandlerHOC"));
var RatingField = function (props) { return (React.createElement("div", null,
props.label && React.createElement("label", { htmlFor: "", style: { padding: "5px 0", display: "block" } }, props.label),
React.createElement(Rating_1.Rating, { disabled: props.readOnly, rating: props.value, onChanged: function (value) {
if (props.onChange)
props.onChange(value);
if (props.onBlur)
props.onBlur(value);
}, min: props.customProps && props.customProps.min || 0, max: props.customProps && props.customProps.max || 5, size: props.customProps && props.customProps.size || Rating_1.RatingSize.Large }))); };
exports.default = ErrorHandlerHOC_1.default(RatingField);
//# sourceMappingURL=RatingField.js.map