UNPKG

lucid-ui

Version:

A UI component library from AppNexus.

97 lines (96 loc) 3.4 kB
import React from 'react'; import { StandardProps } from '../../util/component-types'; import { IButtonProps } from '../Button/Button'; import { IDropMenuState, IDropMenuProps } from '../DropMenu/DropMenu'; import * as reducers from './SplitButton.reducers'; /** SplitButton Button Child Component */ interface ISplitButtonButtonChildProps extends StandardProps { /** Disables selection of the \`Button\`. */ isDisabled?: boolean; } export interface ISplitButtonProps extends StandardProps { /** Sets the direction the flyout menu will render relative to the SplitButton. */ direction: 'up' | 'down'; /** Style variations of the SplitButton. */ kind?: 'primary' | 'danger'; /** Size variations of the SplitButton. */ size?: 'short' | 'small' | 'large'; /** Form element type variations of SplitButton. Passed through to DOM Button. */ type?: string; /** *Child Element* - props pass through to the underlying DropMenu component */ DropMenu: IDropMenuProps; } declare class SplitButton extends React.Component<ISplitButtonProps> { static displayName: string; static Button: { (_props: ISplitButtonButtonChildProps): null; displayName: string; peek: { description: string; }; propTypes: { children: any; isDisabled: any; onClick: any; }; }; static peek: { description: string; categories: string[]; madeFrom: string[]; }; static reducers: typeof reducers; static propTypes: { DropMenu: any; children: any; className: any; direction: any; kind: any; size: any; type: any; }; static defaultProps: { direction: "down"; type: "button"; DropMenu: { isDisabled: boolean; isExpanded: boolean; direction: "down"; alignment: "start"; selectedIndices: never[]; focusedIndex: null; flyOutStyle: { maxHeight: string; }; onExpand: (...args: any[]) => void; onCollapse: (...args: any[]) => void; onSelect: (...args: any[]) => void; onFocusNext: (...args: any[]) => void; onFocusPrev: (...args: any[]) => void; onFocusOption: (...args: any[]) => void; portalId: string; optionContainerStyle: {}; ContextMenu: { direction: string; directonOffset: number; minWidthOffset: number; alignment: string; getAlignmentOffset: () => number; isExpanded: boolean; onClickOut: null; portalId: null; }; }; }; handleSelect: (optionIndex: number | null, { event, }: { event: React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent>; }) => void; handleClick: ({ event, }: { event: React.MouseEvent<HTMLButtonElement>; }) => void; handleButtonClick: (buttonProps: IButtonProps, event: any) => void; render(): JSX.Element; } declare const _default: typeof SplitButton & import("../../util/state-management").IHybridComponent<ISplitButtonProps, IDropMenuState>; export default _default; export { SplitButton as SplitButtonDumb };