UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

26 lines 1.28 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { BaseButton } from '../BaseButton'; import { BaseComponent, customizable } from '../../../Utilities'; import { getStyles } from './CompoundButton.styles'; var CompoundButton = /** @class */ (function (_super) { tslib_1.__extends(CompoundButton, _super); function CompoundButton() { var _this = _super !== null && _super.apply(this, arguments) || this; /** * Tell BaseComponent to bypass resolution of componentRef. */ _this._skipComponentRefResolution = true; return _this; } CompoundButton.prototype.render = function () { var _a = this.props, _b = _a.primary, primary = _b === void 0 ? false : _b, styles = _a.styles, theme = _a.theme; return (React.createElement(BaseButton, tslib_1.__assign({}, this.props, { variantClassName: primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound', styles: getStyles(theme, styles, primary) }))); }; CompoundButton = tslib_1.__decorate([ customizable('CompoundButton', ['theme', 'styles'], true) ], CompoundButton); return CompoundButton; }(BaseComponent)); export { CompoundButton }; //# sourceMappingURL=CompoundButton.js.map