@uifabric/experiments
Version:
Experimental React components for building experiences for Office 365.
27 lines • 1.91 kB
JavaScript
import * as tslib_1 from "tslib";
/** @jsx withSlots */
import { ContextualMenu, Stack, Text } from 'office-ui-fabric-react';
import { withSlots, getSlots } from '../../../Foundation';
import { Icon } from '../../../utilities/factoryComponents';
import { Button } from '../Button';
import { MenuButton } from '../MenuButton/MenuButton';
export var 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 = getSlots(props, {
root: Stack,
button: Button,
menuButton: MenuButton,
stack: Stack,
icon: Icon,
content: Text,
menu: ContextualMenu,
menuIcon: Icon,
splitDivider: 'span'
});
return (withSlots(Slots.root, { role: "button", "aria-disabled": disabled, horizontal: true, as: "span", verticalAlign: "stretch" },
withSlots(Slots.button, tslib_1.__assign({ styles: styles, tokens: tokens, primary: primary, disabled: primaryActionDisabled || disabled, "aria-disabled": primaryActionDisabled || disabled, onClick: onClick }, rest),
children,
withSlots(Slots.splitDivider, null)),
withSlots(Slots.menuButton, { styles: styles, tokens: tokens, primary: primary, disabled: disabled, onClick: onSecondaryActionClick, menu: Menu })));
};
//# sourceMappingURL=SplitMenuButton.view.js.map