UNPKG

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