UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

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