UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

56 lines 5.68 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { ExampleCard, ComponentPage, PropertiesTableSet } from '@uifabric/example-app-base'; import { SpinButtonBasicExample } from './examples/SpinButton.Basic.Example'; import { SpinButtonBasicDisabledExample } from './examples/SpinButton.BasicDisabled.Example'; import { SpinButtonStatefulExample } from './examples/SpinButton.Stateful.Example'; import { SpinButtonBasicWithIconExample } from './examples/SpinButton.BasicWithIcon.Example'; import { SpinButtonBasicWithIconDisabledExample } from './examples/SpinButton.BasicWithIconDisabled.Example'; import { SpinButtonBasicWithEndPositionExample } from './examples/SpinButton.BasicWithEndPosition.Example'; import { SpinButtonCustomStyledExample } from './examples/SpinButton.CustomStyled.Example'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { SpinButtonStatus } from './SpinButton.checklist'; var SpinButtonBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.Basic.Example.tsx'); var SpinButtonBasicDisabledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.BasicDisabled.Example.tsx'); var SpinButtonStatefulExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.Stateful.Example.tsx'); var SpinButtonBasicWithIconExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.BasicWithIcon.Example.tsx'); var SpinButtonBasicWithIconDisabledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.BasicWithIconDisabled.Example.tsx'); var SpinButtonBasicWithEndPositionExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.BasicWithEndPosition.Example.tsx'); var SpinButtonCustomStyledExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/examples/SpinButton.CustomStyled.Example.tsx'); var SpinButtonPage = /** @class */ (function (_super) { tslib_1.__extends(SpinButtonPage, _super); function SpinButtonPage() { return _super !== null && _super.apply(this, arguments) || this; } SpinButtonPage.prototype.render = function () { return (React.createElement(ComponentPage, { title: 'SpinButton', componentName: 'SpinButtonExample', exampleCards: React.createElement("div", null, React.createElement(ExampleCard, { title: 'Basic SpinButton', code: SpinButtonBasicExampleCode }, React.createElement(SpinButtonBasicExample, null)), React.createElement(ExampleCard, { title: 'Basic Disabled SpinButton', code: SpinButtonBasicDisabledExampleCode }, React.createElement(SpinButtonBasicDisabledExample, null)), React.createElement(ExampleCard, { title: 'Stateful SpinButton', code: SpinButtonStatefulExampleCode }, React.createElement(SpinButtonStatefulExample, null)), React.createElement(ExampleCard, { title: 'Basic SpinButton With Icon', code: SpinButtonBasicWithIconExampleCode }, React.createElement(SpinButtonBasicWithIconExample, null)), React.createElement(ExampleCard, { title: 'Basic SpinButton With Icon Disabled', code: SpinButtonBasicWithIconDisabledExampleCode }, React.createElement(SpinButtonBasicWithIconDisabledExample, null)), React.createElement(ExampleCard, { title: 'Basic SpinButton With Icon and Positioned at the End', code: SpinButtonBasicWithEndPositionExampleCode }, React.createElement(SpinButtonBasicWithEndPositionExample, null)), React.createElement(ExampleCard, { title: 'Custom Styled SpinButton', code: SpinButtonCustomStyledExampleCode }, React.createElement(SpinButtonCustomStyledExample, null))), propertiesTables: React.createElement(PropertiesTableSet, { sources: [ require('!raw-loader!office-ui-fabric-react/src/components/SpinButton/SpinButton.types.ts') ] }), overview: React.createElement("div", null, React.createElement("p", null, "A SpinButton allows the user to incrementaly adjust a value in small steps. It is mainly used for numeric values, but other values are supported too.")), bestPractices: React.createElement("div", null), dos: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Use a SpinButton when changing a value with precise control."), React.createElement("li", null, "Use a SpinButton when values are tied to a unit."), React.createElement("li", null, "Include a label indicating what value the SpinButton changes."))), donts: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Don\u2019t use a SpinButton if the range of values is large."), React.createElement("li", null, "Don\u2019t use a SpinButton for binary settings."), React.createElement("li", null, "Don't use a SpinButton for a range of three values or less."))), isHeaderVisible: this.props.isHeaderVisible, componentStatus: React.createElement(ComponentStatus, tslib_1.__assign({}, SpinButtonStatus)) })); }; return SpinButtonPage; }(React.Component)); export { SpinButtonPage }; //# sourceMappingURL=SpinButtonPage.js.map