UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

34 lines (32 loc) 2.44 kB
"use strict"; 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 __()); }; var React = require("react"); var index_1 = require("../../components/index"); var Rating_Basic_Example_1 = require("./examples/Rating.Basic.Example"); var pageroute_1 = require("../../utilities/pageroute"); var AppState_1 = require("../../components/App/AppState"); var RatingBasicExampleCode = require('./examples/Rating.Basic.Example.tsx'); var RatingPage = (function (_super) { __extends(RatingPage, _super); function RatingPage() { var _this = _super.call(this) || this; _this._url = pageroute_1.getPageRouteFromState(AppState_1.AppState, 'Basic components', 'Slider'); return _this; } RatingPage.prototype.render = function () { return (React.createElement(index_1.ComponentPage, { title: 'Rating', componentName: 'RatingExample', exampleCards: React.createElement(index_1.ExampleCard, { title: 'Rating', code: RatingBasicExampleCode }, React.createElement(Rating_Basic_Example_1.RatingBasicExample, null)), propertiesTables: React.createElement(index_1.PropertiesTableSet, { componentName: 'Rating' }), overview: React.createElement("div", null, React.createElement("p", null, "Ratings provide insight regarding others\u2019 opinions and experiences with a product, helping users make more-informed purchasing decisions. Users can also rate products they\u2019ve purchased.")), bestPractices: React.createElement("div", null), dos: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Make it clear which product the rating pertains to by making sure the layout and grouping are clear when several products are on the page."))), donts: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Don\u2019t use the rating component for data that has a continuous range, such as the brightness of a photo. Instead, use a slider."))), route: this._url, isHeaderVisible: this.props.isHeaderVisible })); }; return RatingPage; }(React.Component)); exports.RatingPage = RatingPage; //# sourceMappingURL=RatingPage.js.map