-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
34 lines (33 loc) · 1.03 KB
/
Copy pathindex.js
File metadata and controls
34 lines (33 loc) · 1.03 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
const Notification = (props) => {
const { className, message, icon_src } = props;
return (
<div className={`bar-container ${className}`}>
<img src={icon_src} className="bar-icon" />
<p className="msg-heading">{message}</p>
</div>
);
};
const element = (
<div className="main-container">
<h1 className="main-heading">Notifications</h1>
<Notification
icon_src="https://assets.ccbp.in/frontend/react-js/primary-icon-img.png"
className="notification-1"
message="Information message"
/>
<Notification
icon_src="https://assets.ccbp.in/frontend/react-js/success-icon-img.png"
className="notification-2"
message="Success message"
/>
<Notification
icon_src="https://assets.ccbp.in/frontend/react-js/warning-icon-img.png"
className="notification-3"
message="Warning message"
/>
<Notification
icon_src="https://assets.ccbp.in/frontend/react-js/danger-icon-img.png"
className="notification-4"
message="Error message"
/>
</div>