Debian Codegraph @

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

raw
1 /// <reference types="react" />
2 import { OUIAProps } from '../../helpers/OUIA/ouia';
3 export declare enum ButtonVariant {
4 primary = "primary",
5 secondary = "secondary",
6 tertiary = "tertiary",
7 danger = "danger",
8 warning = "warning",
9 link = "link",
10 plain = "plain",
11 control = "control",
12 stateful = "stateful"
13 }
14 export declare enum ButtonType {
15 button = "button",
16 submit = "submit",
17 reset = "reset"
18 }
19 export declare enum ButtonSize {
20 default = "default",
21 sm = "sm",
22 lg = "lg"
23 }
24 export declare enum ButtonState {
25 read = "read",
26 unread = "unread",
27 attention = "attention"
28 }
29 export interface BadgeCountObject {
30 /** Adds styling to the badge to indicate it has been read */
31 isRead?: boolean;
32 /** Adds count number right of button */
33 count?: number;
34 /** Additional classes added to the badge count */
35 className?: string;
36 }
37 export interface ButtonProps extends Omit<React.HTMLProps<HTMLButtonElement>, 'ref' | 'size'>, OUIAProps {
38 /** Content rendered inside the button */
39 children?: React.ReactNode;
40 /** Additional classes added to the button */
41 className?: string;
42 /** Sets the base component to render. defaults to button */
43 component?: React.ElementType<any> | React.ComponentType<any>;
44 /** Adds clicked styling to button. */
45 isClicked?: boolean;
46 /** Adds block styling to button */
47 isBlock?: boolean;
48 /** Adds disabled styling and disables the button using the disabled html attribute */
49 isDisabled?: boolean;
50 /** Adds disabled styling and communicates that the button is disabled using the aria-disabled html attribute */
51 isAriaDisabled?: boolean;
52 /** Adds progress styling to button */
53 isLoading?: boolean;
54 /** Text describing that current loading status or progress */
55 spinnerAriaValueText?: string;
56 /** Accessible label for the spinner to describe what is loading */
57 spinnerAriaLabel?: string;
58 /** Id of element which describes what is being loaded */
59 spinnerAriaLabelledBy?: string;
60 /** Events to prevent when the button is in an aria-disabled state */
61 inoperableEvents?: string[];
62 /** Adds inline styling to a link button */
63 isInline?: boolean;
64 /** Adds favorite styling to a button */
65 isFavorite?: boolean;
66 /** Flag indicating whether the button is favorited or not, only when isFavorite is true. */
67 isFavorited?: boolean;
68 /** Adds styling which affects the size of the button */
69 size?: 'default' | 'sm' | 'lg';
70 /** Sets button type */
71 type?: 'button' | 'submit' | 'reset';
72 /** Adds button variant styles */
73 variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'link' | 'plain' | 'control' | 'stateful';
74 /** Sets state of the stateful button variant. Default is "unread" */
75 state?: 'read' | 'unread' | 'attention';
76 /** Applies no padding on a plain button variant. Use when plain button is placed inline with text */
77 hasNoPadding?: boolean;
78 /** Sets position of the icon. Note: "left" and "right" are deprecated. Use "start" and "end" instead */
79 iconPosition?: 'start' | 'end' | 'left' | 'right';
80 /** Adds accessible text to the button. */
81 'aria-label'?: string;
82 /** Icon for the button. */
83 icon?: React.ReactNode | null;
84 /** Sets the button tabindex. */
85 tabIndex?: number;
86 /** Adds danger styling to secondary or link button variants */
87 isDanger?: boolean;
88 /** Flag indicating whether content the button controls is expanded or not. Required when isHamburger is true. */
89 isExpanded?: boolean;
90 /** Flag indicating the button is a settings button. This will override the icon property. */
91 isSettings?: boolean;
92 /** Flag indicating the button is a hamburger button. This will override the icon property. */
93 isHamburger?: boolean;
94 /** Adjusts and animates the hamburger icon to indicate what will happen upon clicking the button. */
95 hamburgerVariant?: 'expand' | 'collapse';
96 /** @beta Flag indicating the button is a circle button. Intended for buttons that only contain an icon.. */
97 isCircle?: boolean;
98 /** @beta Flag indicating the button is a docked variant button. For use in docked navigation. */
99 isDocked?: boolean;
100 /** @beta Flag indicating the docked button should display text. Only applies when isDocked is true. */
101 isTextExpanded?: boolean;
102 /** @hide Forwarded ref */
103 innerRef?: React.Ref<any>;
104 /** Adds count number to button */
105 countOptions?: BadgeCountObject;
106 /** Value to overwrite the randomly generated data-ouia-component-id.*/
107 ouiaId?: number | string;
108 /** 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. */
109 ouiaSafe?: boolean;
110 }
111 export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<any>>;
112 //# sourceMappingURL=Button.d.ts.map