UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Microsoft 365.

114 lines (113 loc) 3.9 kB
import * as React from 'react'; import { IComponent } from '@uifabric/foundation/lib/next/IComponent'; import { IComponentStyles, IHTMLSlot, ISlotProp, ISlottableProps, IStyleableComponentProps } from '../../../Foundation'; import { IBaseProps } from '../../../Utilities'; import { INativeButtonProps } from '../Button.types'; import { IMenuButton, IMenuButtonProps, IMenuButtonSlot, IMenuButtonSlots, IMenuButtonTokens, IMenuButtonViewProps } from '../MenuButton/MenuButton.types'; /** * @deprecated * {@docCategory Button} */ export declare type ISplitButtonComponent = IComponent<ISplitButtonProps, ISplitButtonTokens, ISplitButtonStyles, ISplitButtonViewProps, ISplitButtonSlots>; /** * @deprecated * {@docCategory Button} */ export declare type ISplitButtonTokenReturnType = ReturnType<Extract<ISplitButtonComponent['tokens'], Function>>; /** * @deprecated * {@docCategory Button} */ export declare type ISplitButtonStylesReturnType = ReturnType<Extract<ISplitButtonComponent['styles'], Function>>; /** * @deprecated * {@docCategory Button} */ export declare type ISplitButtonSlot = ISlotProp<ISplitButtonProps>; /** * @deprecated * {@docCategory Button} */ export interface ISplitButtonSlots extends IMenuButtonSlots { /** * Defines the root slot of the component. * @deprecated */ root?: IHTMLSlot; /** * Menu button that is going to be rendered. * @deprecated */ menuButton?: IMenuButtonSlot; /** * Defines the container for the divider that is used for styling purposes. * @deprecated */ splitDividerContainer?: IHTMLSlot; /** * Defines the divider that separates the left and right parts of a SplitButton. * @deprecated */ splitDivider?: IHTMLSlot; } /** * @deprecated * {@docCategory Button} */ export interface ISplitButton extends IMenuButton { } /** * @deprecated This component was experimental and is not longer being developed on, nor will it be supported in the * future. * {@docCategory Button} */ export interface ISplitButtonProps extends ISlottableProps<ISplitButtonSlots>, Pick<IMenuButtonProps, 'href' | 'primary' | 'disabled' | 'onClick' | 'onKeyDown' | 'checked' | 'allowDisabledFocus' | 'ariaLabel' | 'keytipProps' | 'uniqueId' | 'defaultExpanded' | 'expanded' | 'onMenuDismiss'>, IStyleableComponentProps<ISplitButtonProps, ISplitButtonTokens, ISplitButtonStyles>, IBaseProps<ISplitButton>, INativeButtonProps { /** * Defines whether the first action of the SplitButton is disabled. * @defaultvalue false * @deprecated */ primaryActionDisabled?: boolean; /** * Defines the aria label that the screen readers use when focus goes on the second focus stop of the SplitButton. * @deprecated */ secondaryAriaLabel?: string; /** * Defines an event callback that is triggered when the secondary action of a SplitButton is clicked. * @deprecated */ onSecondaryActionClick?: (ev: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement | HTMLDivElement>) => void; } /** * @deprecated * {@docCategory Button} */ export interface ISplitButtonViewProps extends Pick<IMenuButtonViewProps, 'buttonRef' | 'menuButtonRef'>, ISplitButtonProps { } /** * @deprecated * {@docCategory Button} */ export interface ISplitButtonTokens extends IMenuButtonTokens { /** * Defines the color of the SplitButton divider. * @deprecated */ dividerColor?: string; /** * Defines the color of the SplitButton divider when in high contrast mode. * @deprecated */ highContrastDividerColor?: string; /** * Defines the padding of the menu section of the SplitButton. * @deprecated */ secondaryPadding?: number | string; } /** * @deprecated * {@docCategory Button} */ export declare type ISplitButtonStyles = IComponentStyles<ISplitButtonSlots>;