UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

35 lines (33 loc) 1.84 kB
define(["require", "exports", "tslib", "react", "office-ui-fabric-react/lib/Utilities", "office-ui-fabric-react/lib/Rating", "./Rating.Basic.Example.scss"], function (require, exports, tslib_1, React, Utilities_1, Rating_1) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var RatingBasicExample = (function (_super) { tslib_1.__extends(RatingBasicExample, _super); function RatingBasicExample() { var _this = _super.call(this) || this; _this.state = { rating: null }; return _this; } RatingBasicExample.prototype.render = function () { return (React.createElement("div", { className: 'ms-RatingBasicExample' }, React.createElement(Rating_1.Rating, { min: 1, max: 5, rating: this.state.rating, onChanged: this._onChanged }), React.createElement(Rating_1.Rating, { min: 1, max: 5, size: Rating_1.RatingSize.Large, rating: this.state.rating, onChanged: this._onChanged }), React.createElement(Rating_1.Rating, { min: 1, max: 10, size: Rating_1.RatingSize.Large, rating: this.state.rating, onChanged: this._onChanged }), "Disabled:", React.createElement(Rating_1.Rating, { min: 1, max: 5, rating: this.state.rating, onChanged: this._onChanged, disabled: true }))); }; RatingBasicExample.prototype._onChanged = function (rating) { this.setState({ rating: rating }); }; return RatingBasicExample; }(React.Component)); tslib_1.__decorate([ Utilities_1.autobind ], RatingBasicExample.prototype, "_onChanged", null); exports.RatingBasicExample = RatingBasicExample; }); //# sourceMappingURL=Rating.Basic.Example.js.map