office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
24 lines (23 loc) • 1.05 kB
JavaScript
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
define(["require", "exports", 'react', '../../utilities/css', './Label.scss'], function (require, exports, React, css_1) {
"use strict";
var Label = (function (_super) {
__extends(Label, _super);
function Label() {
_super.apply(this, arguments);
}
Label.prototype.render = function () {
var _a = this.props, disabled = _a.disabled, required = _a.required, children = _a.children, className = _a.className;
return (React.createElement("label", React.__spread({}, this.props, {className: css_1.css('ms-Label', className, {
'is-disabled': disabled,
'is-required': required
})}), children));
};
return Label;
}(React.Component));
exports.Label = Label;
});