@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
24 lines • 2.25 kB
JavaScript
define(["require", "exports", "tslib", "office-ui-fabric-react", "../../../Foundation", "../../../utilities/factoryComponents", "../Button", "../MenuButton/MenuButton"], function (require, exports, tslib_1, office_ui_fabric_react_1, Foundation_1, factoryComponents_1, Button_1, MenuButton_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SplitMenuButtonView = function (props) {
var styles = props.styles, tokens = props.tokens, children = props.children, primary = props.primary, disabled = props.disabled, onClick = props.onClick, expanded = props.expanded, Menu = props.menu, primaryActionDisabled = props.primaryActionDisabled, onMenuDismiss = props.onMenuDismiss, menuTarget = props.menuTarget, onSecondaryActionClick = props.onSecondaryActionClick, rest = tslib_1.__rest(props, ["styles", "tokens", "children", "primary", "disabled", "onClick", "expanded", "menu", "primaryActionDisabled", "onMenuDismiss", "menuTarget", "onSecondaryActionClick"]);
var Slots = Foundation_1.getSlots(props, {
root: office_ui_fabric_react_1.Stack,
button: Button_1.Button,
menuButton: MenuButton_1.MenuButton,
stack: office_ui_fabric_react_1.Stack,
icon: factoryComponents_1.Icon,
content: office_ui_fabric_react_1.Text,
menu: office_ui_fabric_react_1.ContextualMenu,
menuIcon: factoryComponents_1.Icon,
splitDivider: 'span'
});
return (Foundation_1.withSlots(Slots.root, { role: "button", "aria-disabled": disabled, horizontal: true, as: "span", verticalAlign: "stretch" },
Foundation_1.withSlots(Slots.button, tslib_1.__assign({ styles: styles, tokens: tokens, primary: primary, disabled: primaryActionDisabled || disabled, "aria-disabled": primaryActionDisabled || disabled, onClick: onClick }, rest),
children,
Foundation_1.withSlots(Slots.splitDivider, null)),
Foundation_1.withSlots(Slots.menuButton, { styles: styles, tokens: tokens, primary: primary, disabled: disabled, onClick: onSecondaryActionClick, menu: Menu })));
};
});
//# sourceMappingURL=SplitMenuButton.view.js.map