import { Accessibility, SplitButtonBehaviorProps } from '@fluentui/accessibility'; import { ComponentEventHandler, ShorthandValue, ShorthandCollection, FluentComponentStaticProps } from '../../types'; import { UIComponentProps, ChildrenComponentProps, ContentComponentProps, SizeValue } from '../../utils'; import { SplitButtonToggle, SplitButtonToggleProps } from './SplitButtonToggle'; import { ButtonProps } from '../Button/Button'; import { MenuProps } from '../Menu/Menu'; import { MenuItemProps } from '../Menu/MenuItem'; import { PositioningProps } from '../../utils/positioner/types'; import { ComponentWithAs } from '@fluentui/react-bindings'; export interface SplitButtonProps extends UIComponentProps, ChildrenComponentProps, ContentComponentProps, PositioningProps { /** * Accessibility behavior if overridden by the user. */ accessibility?: Accessibility; /** Shorthand for the main button. */ button?: ShorthandValue; /** Initial value for 'open'. */ defaultOpen?: boolean; /** A split button can be disabled. */ disabled?: boolean; /** Shorthand for the menu. */ menu?: ShorthandValue | ShorthandCollection; /** * Called after user's click on the main button. * * @param event - React's original SyntheticEvent. * @param data - All props. */ onMainButtonClick?: ComponentEventHandler; /** * Called after user's click on a menu item. * * @param event - React's original SyntheticEvent. * @param data - All props. */ onMenuItemClick?: ComponentEventHandler; /** * Event for request to change 'open' value. * @param event - React's original SyntheticEvent. * @param data - All props and proposed value. */ onOpenChange?: ComponentEventHandler; /** Defines whether menu is displayed. */ open?: boolean; /** A split button can be formatted to show different levels of emphasis. */ primary?: boolean; /** A split button can be formatted to show different levels of emphasis. */ secondary?: boolean; /** A split button can be sized */ size?: SizeValue; /** Shorthand for the toggle button. */ toggleButton?: ShorthandValue; } export declare const splitButtonClassName = "ui-splitbutton"; export declare type SplitButtonStylesProps = Required> & { isFromKeyboard: boolean; }; /** * A SplitButton enables users to take one of several related actions, one being dominant and rest being displayed in a menu. */ export declare const SplitButton: ComponentWithAs<'div', SplitButtonProps> & FluentComponentStaticProps & { Toggle: typeof SplitButtonToggle; };