UNPKG

@patternfly/react-core

Version:

This library provides a set of common React components for use with the PatternFly reference implementation.

57 lines 2.69 kB
import * as React from 'react'; export interface SelectToggleProps extends Omit<React.HTMLProps<HTMLElement>, 'ref'> { /** HTML ID of dropdown toggle */ id: string; /** Anything which can be rendered as dropdown toggle */ children: React.ReactNode; /** Classes applied to root element of dropdown toggle */ className?: string; /** Flag to indicate if select is open */ isOpen?: boolean; /** Callback called when toggle is clicked */ onToggle?: (event: React.MouseEvent | React.ChangeEvent | React.KeyboardEvent | Event, isExpanded: boolean) => void; /** Callback for toggle open on keyboard entry */ onEnter?: () => void; /** Callback for toggle close */ onClose?: () => void; /** Callback for toggle blur */ onBlur?: (event?: any) => void; /** @hide Internal callback for toggle keyboard navigation */ handleTypeaheadKeys?: (position: string, shiftKey?: boolean) => void; /** @hide Internal callback to move focus to last menu item */ moveFocusToLastMenuItem?: () => void; /** Element which wraps toggle */ parentRef: React.RefObject<HTMLDivElement>; /** Custom icon for the dropdown replacing the CaretDownIcon */ toggleIndicator?: React.ReactElement; /** The menu element */ menuRef?: React.RefObject<HTMLElement>; /** The menu footer element */ footerRef?: React.RefObject<HTMLDivElement>; /** Forces active state */ isActive?: boolean; /** Display the toggle with no border or background */ isPlain?: boolean; /** Flag indicating if select is disabled */ isDisabled?: boolean; /** Flag indicating if placeholder styles should be applied */ hasPlaceholderStyle?: boolean; /** Type of the toggle button, defaults to 'button' */ type?: 'reset' | 'button' | 'submit' | undefined; /** Id of label for the Select aria-labelledby */ 'aria-labelledby'?: string; /** Label for toggle of select variants */ 'aria-label'?: string; /** Flag for variant, determines toggle rules and interaction */ variant?: 'single' | 'checkbox' | 'typeahead' | 'typeaheadmulti'; /** Flag indicating if select toggle has an clear button */ hasClearButton?: boolean; /** Flag indicating if select menu has a footer */ hasFooter?: boolean; /** @hide Internal callback for handling focus when typeahead toggle button clicked. */ onClickTypeaheadToggleButton?: () => void; /** @hide Internal ref for the select toggle */ innerRef?: React.Ref<any>; } export declare const SelectToggle: React.ForwardRefExoticComponent<SelectToggleProps & React.RefAttributes<any>>; //# sourceMappingURL=SelectToggle.d.ts.map