1 | import * as React from 'react';
|
2 | import { OUIAProps } from '../../helpers';
|
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 | }
|
13 | export declare enum ButtonType {
|
14 | button = "button",
|
15 | submit = "submit",
|
16 | reset = "reset"
|
17 | }
|
18 | export interface ButtonProps extends Omit<React.HTMLProps<HTMLButtonElement>, 'ref'>, OUIAProps {
|
19 | /** Content rendered inside the button */
|
20 | children?: React.ReactNode;
|
21 | /** Additional classes added to the button */
|
22 | className?: string;
|
23 | /** Sets the base component to render. defaults to button */
|
24 | component?: React.ElementType<any> | React.ComponentType<any>;
|
25 | /** Adds active styling to button. */
|
26 | isActive?: boolean;
|
27 | /** Adds block styling to button */
|
28 | isBlock?: boolean;
|
29 | /** Adds disabled styling and disables the button using the disabled html attribute */
|
30 | isDisabled?: boolean;
|
31 | /** Adds disabled styling and communicates that the button is disabled using the aria-disabled html attribute */
|
32 | isAriaDisabled?: boolean;
|
33 | /** Adds progress styling to button */
|
34 | isLoading?: boolean;
|
35 | /** Text describing that current loading status or progress */
|
36 | spinnerAriaValueText?: string;
|
37 | /** Accessible label for the spinner to describe what is loading */
|
38 | spinnerAriaLabel?: string;
|
39 | /** Id of element which describes what is being loaded */
|
40 | spinnerAriaLabelledBy?: string;
|
41 | /** Events to prevent when the button is in an aria-disabled state */
|
42 | inoperableEvents?: string[];
|
43 | /** Adds inline styling to a link button */
|
44 | isInline?: boolean;
|
45 | /** Sets button type */
|
46 | type?: 'button' | 'submit' | 'reset';
|
47 | /** Adds button variant styles */
|
48 | variant?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'link' | 'plain' | 'control';
|
49 | /** Sets position of the link icon */
|
50 | iconPosition?: 'left' | 'right';
|
51 | /** Adds accessible text to the button. */
|
52 | 'aria-label'?: string;
|
53 | /** Icon for the button. Usable by all variants except for plain. */
|
54 | icon?: React.ReactNode | null;
|
55 | /** Sets the button tabindex. */
|
56 | tabIndex?: number;
|
57 | /** Adds small styling to the button */
|
58 | isSmall?: boolean;
|
59 | /** Adds large styling to the button */
|
60 | isLarge?: boolean;
|
61 | /** Adds danger styling to secondary or link button variants */
|
62 | isDanger?: boolean;
|
63 | /** Forwarded ref */
|
64 | innerRef?: React.Ref<any>;
|
65 | }
|
66 | export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<any>>;
|
67 | //# sourceMappingURL=Button.d.ts.map |
\ | No newline at end of file |