UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

28 lines 2.67 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { ExampleCard, ComponentPage, PropertiesTableSet } from '@uifabric/example-app-base'; import { SwatchColorPickerBasicExample } from './examples/SwatchColorPicker.Basic.Example'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { SwatchColorPickerStatus } from './SwatchColorPicker.checklist'; var SwatchColorPickerBasicExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/SwatchColorPicker/examples/SwatchColorPicker.Basic.Example.tsx'); var SwatchColorPickerPage = /** @class */ (function (_super) { tslib_1.__extends(SwatchColorPickerPage, _super); function SwatchColorPickerPage() { return _super !== null && _super.apply(this, arguments) || this; } SwatchColorPickerPage.prototype.render = function () { return (React.createElement(ComponentPage, { title: 'SwatchColorPicker', componentName: 'SwatchColorPickerExample', exampleCards: React.createElement(ExampleCard, { title: 'SwatchColorPicker', code: SwatchColorPickerBasicExampleCode }, React.createElement(SwatchColorPickerBasicExample, null)), propertiesTables: React.createElement(PropertiesTableSet, { sources: [ require('!raw-loader!office-ui-fabric-react/src/components/SwatchColorPicker/SwatchColorPicker.types.ts') ] }), overview: React.createElement("div", null, React.createElement("p", null, "A SwatchColorPicker is a list of colors displayed as a grid as options for the user. It can be displayed by itself, with header and/or dividers, or as a button which expands to show the swatch color picker")), dos: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Use a SwatchColorPicker when there are multiple finite choices that can be grouped and/or collapsed under one title."), React.createElement("li", null, "SwatchColorPickers contain a grid of colors."))), donts: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Do not use a SwatchColorPicker when there are a a very large number of color choices. The best component for to that is a ColorPicker."))), isHeaderVisible: this.props.isHeaderVisible, componentStatus: React.createElement(ComponentStatus, tslib_1.__assign({}, SwatchColorPickerStatus)) })); }; return SwatchColorPickerPage; }(React.Component)); export { SwatchColorPickerPage }; //# sourceMappingURL=SwatchColorPickerPage.js.map