UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

66 lines 2.78 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = require("react"); var ComboBox_1 = require("office-ui-fabric-react/lib/ComboBox"); require("./ComboBox.Basic.Example.scss"); var ComboBoxCustomStyledExample = /** @class */ (function (_super) { tslib_1.__extends(ComboBoxCustomStyledExample, _super); function ComboBoxCustomStyledExample() { var _this = _super !== null && _super.apply(this, arguments) || this; _this._testOptionsWithCustomStyling = [ { key: 'A', text: 'Arial Black', styles: { optionText: { fontFamily: '"Arial Black", "Arial Black_MSFontService", sans-serif' } } }, { key: 'B', text: 'Times New Roman', styles: { optionText: { fontFamily: '"Times New Roman", "Times New Roman_MSFontService", serif' } } }, { key: 'C', text: 'Comic Sans MS', styles: { optionText: { fontFamily: '"Comic Sans MS", "Comic Sans MS_MSFontService", fantasy' } } }, { key: 'D', text: 'Calibri', styles: { optionText: { fontFamily: 'Calibri, Calibri_MSFontService, sans-serif' } } } ]; return _this; } ComboBoxCustomStyledExample.prototype.render = function () { return (React.createElement("div", { className: "ms-ComboBoxCustomStyledExample" }, React.createElement(ComboBox_1.ComboBox, { defaultSelectedKey: "C", label: "Custom styled uncontrolled ComboBox (allowFreeform: T, AutoComplete: T):", id: "Basicdrop6", ariaLabel: "Custom styled ComboBox example", allowFreeform: true, autoComplete: "on", options: this._testOptionsWithCustomStyling, styles: { container: { maxWidth: '300px' } }, comboBoxOptionStyles: { optionText: { fontFamily: 'initial' // this should be overriden by custom styles for each option } } }))); }; return ComboBoxCustomStyledExample; }(React.Component)); exports.ComboBoxCustomStyledExample = ComboBoxCustomStyledExample; //# sourceMappingURL=ComboBox.CustomStyled.Example.js.map