1 | import * as React from '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 | default = "default"
|
10 | }
|
11 | export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'action' | 'title'>, OUIAProps {
|
12 | /** Adds alert variant styles */
|
13 | variant?: 'success' | 'danger' | 'warning' | 'info' | 'default';
|
14 | /** Flag to indicate if the alert is inline */
|
15 | isInline?: boolean;
|
16 | /** Flag to indicate if the alert is plain */
|
17 | isPlain?: boolean;
|
18 | /** Title of the alert */
|
19 | title: React.ReactNode;
|
20 | /** Sets the heading level to use for the alert title. Default is h4. */
|
21 | titleHeadingLevel?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
22 | /** Close button; use the alertActionCloseButton component */
|
23 | actionClose?: React.ReactNode;
|
24 | /** Action links; use a single alertActionLink component or multiple wrapped in an array or React.Fragment */
|
25 | actionLinks?: React.ReactNode;
|
26 | /** Content rendered inside the alert */
|
27 | children?: React.ReactNode;
|
28 | /** Additional classes added to the alert */
|
29 | className?: string;
|
30 | /** Adds accessible text to the alert */
|
31 | 'aria-label'?: string;
|
32 | /** Variant label text for screen readers */
|
33 | variantLabel?: string;
|
34 | /** Flag to indicate if the alert is in a live region */
|
35 | isLiveRegion?: boolean;
|
36 | /** If set to true, the timeout is 8000 milliseconds. If a number is provided, alert will be dismissed after that amount of time in milliseconds. */
|
37 | timeout?: number | boolean;
|
38 | /** If the user hovers over the alert and `timeout` expires, this is how long to wait before finally dismissing the alert */
|
39 | timeoutAnimation?: number;
|
40 | /** Function to be executed on alert timeout. Relevant when the timeout prop is set */
|
41 | onTimeout?: () => void;
|
42 | /** Truncate title to number of lines */
|
43 | truncateTitle?: number;
|
44 | /** Position of the tooltip which is displayed if text is truncated */
|
45 | tooltipPosition?: TooltipPosition | 'auto' | 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
|
46 | /** Set a custom icon to the alert. If not set the icon is set according to the variant */
|
47 | customIcon?: React.ReactNode;
|
48 | /** Flag indicating that the alert is expandable */
|
49 | isExpandable?: boolean;
|
50 | /** Adds accessible text to the alert Toggle */
|
51 | toggleAriaLabel?: string;
|
52 | }
|
53 | export declare const Alert: React.FunctionComponent<AlertProps>;
|
54 | //# sourceMappingURL=Alert.d.ts.map |
\ | No newline at end of file |