Repository URL to install this package:
|
Version:
3.1.2 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = require("react");
const mobx_react_1 = require("xmobx/mobx-react");
let LabelPlugin = class LabelPlugin extends React.Component {
static isSatisfiedByProps(props) {
return ['label'].includes(props.type);
}
render() {
const { state } = this.props;
const { ref, htmlFor, className, label, labelText } = state, remainingProps = tslib_1.__rest(state, ["ref", "htmlFor", "className", "label", "labelText"]);
return (React.createElement("label", Object.assign({ htmlFor: htmlFor, className: className }, remainingProps), labelText || label));
}
};
LabelPlugin = tslib_1.__decorate([
mobx_react_1.observer
], LabelPlugin);
exports.LabelPlugin = LabelPlugin;
exports.default = LabelPlugin;
//# sourceMappingURL=LabelPlugin.js.map