UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

63 lines 2.6 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { ComboBox } from 'office-ui-fabric-react/lib/ComboBox'; import './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, { 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', }, } }))); }; return ComboBoxCustomStyledExample; }(React.Component)); export { ComboBoxCustomStyledExample }; //# sourceMappingURL=ComboBox.CustomStyled.Example.js.map