Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/MenuToggle/MenuToggle.d.ts

raw
1 /// <reference types="react" />
2 import { BadgeProps } from '../Badge';
3 import { OUIAProps } from '../../helpers';
4 export declare enum MenuToggleStatus {
5 success = "success",
6 danger = "danger",
7 warning = "warning"
8 }
9 export declare enum MenuToggleSize {
10 default = "default",
11 sm = "sm"
12 }
13 export type MenuToggleElement = HTMLDivElement | HTMLButtonElement;
14 export interface MenuToggleProps extends Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement> & React.HTMLAttributes<HTMLDivElement>, MenuToggleElement>, 'ref'>, OUIAProps {
15 /** Content rendered inside the toggle */
16 children?: React.ReactNode;
17 /** Additional classes added to the toggle */
18 className?: string;
19 /** Flag indicating the toggle has expanded styling */
20 isExpanded?: boolean;
21 /** Flag indicating the toggle is disabled */
22 isDisabled?: boolean;
23 /** Flag indicating the toggle is full height */
24 isFullHeight?: boolean;
25 /** Flag indicating the toggle takes up the full width of its parent */
26 isFullWidth?: boolean;
27 /** @beta Flag indicating the toggle is placed inside a form */
28 isInForm?: boolean;
29 /** Flag indicating the toggle contains placeholder text */
30 isPlaceholder?: boolean;
31 /** @beta Flag indicating the toggle has circular styling. Can only be applied to plain toggles. */
32 isCircle?: boolean;
33 /** Flag indicating whether the toggle is a settings toggle. This will override the icon property */
34 isSettings?: boolean;
35 /** @beta Flag indicating the menu toggle is a docked variant. For use in docked navigation. */
36 isDocked?: boolean;
37 /** @beta Flag indicating the docked toggle should display text. Only applies when isDocked is true. */
38 isTextExpanded?: boolean;
39 /** Elements to display before the toggle button. When included, renders the menu toggle as a split button. */
40 splitButtonItems?: React.ReactNode[];
41 /** Variant styles of the menu toggle */
42 variant?: 'default' | 'plain' | 'primary' | 'plainText' | 'secondary' | 'typeahead';
43 /** Status styles of the menu toggle */
44 status?: 'success' | 'warning' | 'danger';
45 /** Overrides the status icon */
46 statusIcon?: React.ReactNode;
47 /** Optional icon or image rendered inside the toggle, before the children content. It is
48 * recommended to wrap most basic icons in our icon component.
49 */
50 icon?: React.ReactNode;
51 /** Optional badge rendered inside the toggle, after the children content */
52 badge?: BadgeProps | React.ReactNode;
53 /** Adds styling which affects the size of the menu toggle */
54 size?: 'default' | 'sm';
55 /** @hide Forwarded ref */
56 innerRef?: React.Ref<MenuToggleElement>;
57 /** Value to overwrite the randomly generated data-ouia-component-id. It will always target the toggle button. */
58 ouiaId?: number | string;
59 /** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
60 ouiaSafe?: boolean;
61 }
62 export declare const MenuToggle: import("react").ForwardRefExoticComponent<MenuToggleProps & import("react").RefAttributes<MenuToggleElement>>;
63 //# sourceMappingURL=MenuToggle.d.ts.map