-
Notifications
You must be signed in to change notification settings - Fork 0
/
Alerts.tsx
52 lines (47 loc) · 1.47 KB
/
Alerts.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import * as React from 'react';
import * as Icon from 'react-feather';
import Container from './Container';
const Danger = (props: React.HTMLProps<HTMLDivElement>) => (
<div
className={`${props.className} p-4 mb-4 text-sm text-red-800 rounded-lg bg-red-50`}
role="alert"
>
<Container.FlexResponsiveRow className="items-center gap-8">
<Container.Container>
<Icon.X size={32} />
</Container.Container>
<Container.Container>{props.children}</Container.Container>
</Container.FlexResponsiveRow>
</div>
);
const Info = (props: React.HTMLProps<HTMLDivElement>) => (
<div
className={`${props.className} p-4 mb-4 text-sm text-blue-800 bg-blue-50 rounded-lg`}
role="alert"
>
<Container.FlexResponsiveRow className="items-center gap-8">
<Container.Container>
<Icon.Info size={32} />
</Container.Container>
<Container.Container>{props.children}</Container.Container>
</Container.FlexResponsiveRow>
</div>
);
const Warning = (props: React.HTMLProps<HTMLDivElement>) => (
<div
className={`${props.className} p-4 mb-4 text-sm text-yellow-800 bg-yellow-50 rounded-lg`}
role="alert"
>
<Container.FlexResponsiveRow className="items-center gap-8">
<Container.Container>
<Icon.AlertTriangle size={32} />
</Container.Container>
<Container.Container>{props.children}</Container.Container>
</Container.FlexResponsiveRow>
</div>
);
export default {
Danger,
Info,
Warning,
};