Notifications.jsx
7.36 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
/*!
=========================================================
* Light Bootstrap Dashboard React - v1.3.0
=========================================================
* Product Page: https://www.creative-tim.com/product/light-bootstrap-dashboard-react
* Copyright 2019 Creative Tim (https://www.creative-tim.com)
* Licensed under MIT (https://github.com/creativetimofficial/light-bootstrap-dashboard-react/blob/master/LICENSE.md)
* Coded by Creative Tim
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/
import React, { Component } from "react";
import { Grid, Row, Col, Alert } from "react-bootstrap";
import Button from "components/CustomButton/CustomButton.jsx";
class Notifications extends Component {
render() {
return (
<div className="content">
<Grid fluid>
<div className="card">
<div className="header">
<h4 className="title">Notifications</h4>
<p className="category">
Handcrafted by{" "}
<a
target="_blank"
rel="noopener noreferrer"
href="https://github.com/igorprado"
>
Igor Prado
</a>
. Please checkout the{" "}
<a
href="http://igorprado.com/react-notification-system/"
rel="noopener noreferrer"
target="_blank"
>
full documentation.
</a>
</p>
</div>
<div className="content">
<Row>
<Col md={6}>
<h5>Notifications Style</h5>
<Alert bsStyle="info">
<span>This is a plain notification</span>
</Alert>
<Alert bsStyle="info">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span>This is a notification with close button.</span>
</Alert>
<Alert bsStyle="info" className="alert-with-icon">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span data-notify="icon" className="pe-7s-bell" />
<span data-notify="message">
This is a notification with close button and icon.
</span>
</Alert>
<Alert bsStyle="info" className="alert-with-icon">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span data-notify="icon" className="pe-7s-bell" />
<span data-notify="message">
This is a notification with close button and icon and have
many lines. You can see that the icon and the close button
are always vertically aligned. This is a beautiful
notification. So you don't have to worry about the style.
</span>
</Alert>
</Col>
<Col md={6}>
<h5>Notification states</h5>
<Alert bsStyle="info">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span>
<b> Info - </b> This is a regular notification made with
bsStyle="info"
</span>
</Alert>
<Alert bsStyle="success">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span>
<b> Success - </b> This is a regular notification made
with bsStyle="success"
</span>
</Alert>
<Alert bsStyle="warning">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span>
<b> Warning - </b> This is a regular notification made
with bsStyle="warning"
</span>
</Alert>
<Alert bsStyle="danger">
<button type="button" aria-hidden="true" className="close">
✕
</button>
<span>
<b> Danger - </b> This is a regular notification made with
bsStyle="danger"
</span>
</Alert>
</Col>
</Row>
<br />
<br />
<div className="places-buttons">
<Row>
<Col md={6} mdOffset={3} className="text-center">
<h5>
Notifications Places
<p className="category">Click to view notifications</p>
</h5>
</Col>
</Row>
<Row>
<Col md={2} mdOffset={3}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("tl")}
>
Top Left
</Button>
</Col>
<Col md={2}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("tc")}
>
Top Center
</Button>
</Col>
<Col md={2}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("tr")}
>
Top Right
</Button>
</Col>
</Row>
<Row>
<Col md={2} mdOffset={3}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("bl")}
>
Bottom Left
</Button>
</Col>
<Col md={2}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("bc")}
>
Bottom Center
</Button>
</Col>
<Col md={2}>
<Button
bsStyle="default"
block
onClick={() => this.props.handleClick("br")}
>
Bottom Right
</Button>
</Col>
</Row>
</div>
</div>
</div>
</Grid>
</div>
);
}
}
export default Notifications;