@fluentui/react
Version:
Reusable React components for building web experiences.
24 lines • 1.1 kB
JavaScript
import { __assign, __decorate, __extends } from "tslib";
import * as React from 'react';
import { BaseButton } from '../BaseButton';
import { customizable } from '../../../Utilities';
import { getStyles } from './CompoundButton.styles';
/**
* {@docCategory Button}
*/
export var CompoundButton = /** @class */ (function (_super) {
__extends(CompoundButton, _super);
function CompoundButton() {
return _super !== null && _super.apply(this, arguments) || this;
}
CompoundButton.prototype.render = function () {
var _a, _b;
var primary = (_a = this.props, _b = _a.primary, _b === void 0 ? false : _b), styles = _a.styles, theme = _a.theme;
return (React.createElement(BaseButton, __assign({}, this.props, { variantClassName: primary ? 'ms-Button--compoundPrimary' : 'ms-Button--compound', styles: getStyles(theme, styles, primary) })));
};
CompoundButton = __decorate([
customizable('CompoundButton', ['theme', 'styles'], true)
], CompoundButton);
return CompoundButton;
}(React.Component));
//# sourceMappingURL=CompoundButton.js.map