1 | import * as React from 'react';
|
2 |
|
3 | import SafeAnchor, { SafeAnchorProps } from './SafeAnchor';
|
4 |
|
5 | import { BsPrefixComponent, BsPrefixComponentClass } from './helpers';
|
6 |
|
7 | export class AlertLink<
|
8 |
|
9 | As extends React.ElementType = BsPrefixComponentClass<'a', SafeAnchorProps>
|
10 | > extends BsPrefixComponent<As> {}
|
11 |
|
12 | export class AlertHeading<
|
13 | As extends React.ElementType = 'div'
|
14 | > extends BsPrefixComponent<As> {}
|
15 |
|
16 | export interface AlertProps extends React.HTMLProps<HTMLDivElement> {
|
17 | bsPrefix?: string;
|
18 | variant?:
|
19 | | 'primary'
|
20 | | 'secondary'
|
21 | | 'success'
|
22 | | 'danger'
|
23 | | 'warning'
|
24 | | 'info'
|
25 | | 'dark'
|
26 | | 'light';
|
27 | dismissible?: boolean;
|
28 | show?: boolean;
|
29 | onClose?: () => void;
|
30 | closeLabel?: string;
|
31 | transition?: React.ElementType;
|
32 | }
|
33 |
|
34 | declare const Alert: React.ForwardRefExoticComponent<AlertProps> & {
|
35 | Link: typeof AlertLink;
|
36 | Heading: typeof AlertHeading;
|
37 | };
|
38 |
|
39 | export default Alert;
|