UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

29 lines 2.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); /** @jsx withSlots */ var office_ui_fabric_react_1 = require("office-ui-fabric-react"); var Foundation_1 = require("../../../Foundation"); var factoryComponents_1 = require("../../../utilities/factoryComponents"); var Button_1 = require("../Button"); var MenuButton_1 = require("../MenuButton/MenuButton"); 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