Debian Codegraph @

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

raw
1 /// <reference types="react" />
2 import { OUIAProps } from '../../helpers';
3 import { TooltipPosition } from '../Tooltip';
4 export declare enum AlertVariant {
5 success = "success",
6 danger = "danger",
7 warning = "warning",
8 info = "info",
9 custom = "custom"
10 }
11 /** The main alert component. */
12 export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'action' | 'title'>, OUIAProps {
13 /** Close button; use the alert action close button component. */
14 actionClose?: React.ReactNode;
15 /** Action links; use a single alert action link component or multiple wrapped in an array
16 * or React fragment.
17 */
18 actionLinks?: React.ReactNode;
19 /** Content rendered inside the alert. */
20 children?: React.ReactNode;
21 /** Additional classes to add to the alert. */
22 className?: string;
23 /** Set a custom icon to the alert. If not set the icon is set according to the variant. */
24 customIcon?: React.ReactNode;
25 /** Uniquely identifies the alert. */
26 id?: string;
27 /** Flag indicating that the alert is expandable. */
28 isExpandable?: boolean;
29 /** Flag to indicate if the alert is inline. */
30 isInline?: boolean;
31 /** Flag to indicate if the alert is in a live region. */
32 isLiveRegion?: boolean;
33 /** Flag to indicate if the alert is plain. */
34 isPlain?: boolean;
35 /** Function to be executed on alert timeout. Relevant when the timeout prop is set. */
36 onTimeout?: () => void;
37 /** If set to true, the timeout is 8000 milliseconds. If a number is provided, alert will
38 * be dismissed after that amount of time in milliseconds.
39 */
40 timeout?: number | boolean;
41 /** If the user hovers over the alert and `timeout` expires, this is how long to wait
42 * before finally dismissing the alert.
43 */
44 timeoutAnimation?: number;
45 /** Title of the alert. */
46 title: React.ReactNode;
47 /** Sets the element to use as the alert title. Default is h4. */
48 component?: keyof React.JSX.IntrinsicElements;
49 /** Adds accessible text to the alert toggle. */
50 toggleAriaLabel?: string;
51 /** Position of the tooltip which is displayed if text is truncated. */
52 tooltipPosition?: TooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
53 /** Truncate title to number of lines. */
54 truncateTitle?: number;
55 /** Adds alert variant styles. */
56 variant?: 'success' | 'danger' | 'warning' | 'info' | 'custom';
57 /** Variant label text for screen readers. */
58 variantLabel?: string;
59 /** Value to overwrite the randomly generated data-ouia-component-id.*/
60 ouiaId?: number | string;
61 /** 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. */
62 ouiaSafe?: boolean;
63 }
64 export declare const Alert: React.FunctionComponent<AlertProps>;
65 //# sourceMappingURL=Alert.d.ts.map