-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoastStatus.js
35 lines (31 loc) · 1020 Bytes
/
toastStatus.js
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
import React, { useState } from "react";
import { Toast, Button } from "react-bootstrap";
import { CircleSquare, Check2All } from "react-bootstrap-icons";
const ToastStatusComponent = (props) => {
const [show, setShow] = useState(false);
return (
<>
<Toast
style={{ position: "relative" }}
onClose={() => setShow(false)}
show={show}
delay={3000}
autohide
>
<Toast.Header style={{ textAlign: "right" }}>
<Check2All size={28} color="green" />
<span style={{ marginLeft: "40%", textAlign: "right" }}>
{props.seenAt?.slice(4, 24)}
</span>
</Toast.Header>
<Toast.Body style={{ color: "black" }}>
{props.bioOfUser ? props.bioOfUser : "Bio not available"}
</Toast.Body>
</Toast>
<Button variant="outline-success mx-2" onClick={() => setShow(true)}>
<CircleSquare size={20} color="black" />
</Button>
</>
);
};
export default ToastStatusComponent;