Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / build / dist / src / new-forms / plugins / LabelPlugin.js
Size: Mime:
"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