first commit
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
.timelineList .tList {
|
||||
position: relative;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #F7FAFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.timelineList .tList:last-child {
|
||||
border: none;
|
||||
padding-bottom: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.timelineList .tList .content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.timelineList .tList .content img {
|
||||
margin-right: 10px;
|
||||
width: 27px;
|
||||
}
|
||||
.timelineList .tList .content h5 {
|
||||
margin: 0;
|
||||
color: #5B5B98;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
.timelineList .tList .date {
|
||||
color: #A9A9C8;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 1800px) {
|
||||
.timelineList .tList {
|
||||
margin-bottom: 16.5px;
|
||||
padding-bottom: 16.5px;
|
||||
}
|
||||
}
|
||||
|
||||
[dir="rtl"] .timelineList .tList .content img {
|
||||
margin-right: 0;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
/* For dark mode */
|
||||
[class="dark"] .timelineList .tList {
|
||||
border-bottom: 1px solid var(--borderColor);
|
||||
}
|
||||
[class="dark"] .timelineList .tList:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
[class="dark"] .timelineList .tList .content h5 {
|
||||
color: var(--darkHeadingTextColor);
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
import React from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Card from "@mui/material/Card";
|
||||
import Menu from "@mui/material/Menu";
|
||||
import MenuItem from "@mui/material/MenuItem";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
|
||||
import styles from "@/components/Dashboard/ProjectManagement/ActivityTimeline/ActivityTimeline.module.css";
|
||||
|
||||
const ActivityTimelineData = [
|
||||
{
|
||||
id: "1",
|
||||
image: '/images/pdf-icon.png',
|
||||
title: "Donald updated the status",
|
||||
time: "54 min ago",
|
||||
},
|
||||
{
|
||||
id: "2",
|
||||
image: '/images/man.png',
|
||||
title: "Design new UI and check sales",
|
||||
time: "10 hours ago",
|
||||
},
|
||||
{
|
||||
id: "3",
|
||||
title: "James Bangs Client Meeting",
|
||||
image: '/images/small-product-img.png',
|
||||
time: "5 min ago",
|
||||
},
|
||||
{
|
||||
id: "4",
|
||||
title: "Joseph Rust opened new showcase",
|
||||
image: '/images/small-product-img2.png',
|
||||
time: "10 min ago",
|
||||
},
|
||||
{
|
||||
id: "5",
|
||||
title: "Brust opened new showcase",
|
||||
image: '/images/small-product-img3.png',
|
||||
time: "15 min ago",
|
||||
},
|
||||
{
|
||||
id: "6",
|
||||
title: "Create a new project for client",
|
||||
image: '/images/man.png',
|
||||
time: "20 min ago",
|
||||
},
|
||||
];
|
||||
|
||||
const ActivityTimeline = () => {
|
||||
const [anchorEl, setAnchorEl] = React.useState(null);
|
||||
const open = Boolean(anchorEl);
|
||||
const handleClick = (event) => {
|
||||
setAnchorEl(event.currentTarget);
|
||||
};
|
||||
const handleClose = () => {
|
||||
setAnchorEl(null);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Card
|
||||
sx={{
|
||||
boxShadow: "none",
|
||||
borderRadius: "10px",
|
||||
p: "25px",
|
||||
mb: "15px",
|
||||
}}
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
borderBottom: "1px solid #EEF0F7",
|
||||
paddingBottom: "10px",
|
||||
mb: "20px",
|
||||
}}
|
||||
className="for-dark-bottom-border"
|
||||
>
|
||||
<Typography
|
||||
as="h3"
|
||||
sx={{
|
||||
fontSize: 18,
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
Activity Timeline
|
||||
</Typography>
|
||||
|
||||
<Box>
|
||||
<IconButton
|
||||
onClick={handleClick}
|
||||
size="small"
|
||||
aria-controls={open ? "account-menu" : undefined}
|
||||
aria-haspopup="true"
|
||||
aria-expanded={open ? "true" : undefined}
|
||||
>
|
||||
<MoreHorizIcon />
|
||||
</IconButton>
|
||||
</Box>
|
||||
<Menu
|
||||
anchorEl={anchorEl}
|
||||
id="account-menu"
|
||||
open={open}
|
||||
onClose={handleClose}
|
||||
onClick={handleClose}
|
||||
PaperProps={{
|
||||
elevation: 0,
|
||||
sx: {
|
||||
overflow: "visible",
|
||||
filter: "drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",
|
||||
mt: 1.5,
|
||||
"& .MuiAvatar-root": {
|
||||
width: 32,
|
||||
height: 32,
|
||||
ml: -0.5,
|
||||
mr: 1,
|
||||
},
|
||||
"&:before": {
|
||||
content: '""',
|
||||
display: "block",
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
right: 14,
|
||||
width: 10,
|
||||
height: 10,
|
||||
bgcolor: "background.paper",
|
||||
transform: "translateY(-50%) rotate(45deg)",
|
||||
zIndex: 0,
|
||||
},
|
||||
},
|
||||
}}
|
||||
transformOrigin={{ horizontal: "right", vertical: "top" }}
|
||||
anchorOrigin={{ horizontal: "right", vertical: "bottom" }}
|
||||
>
|
||||
<MenuItem>Last 15 Days</MenuItem>
|
||||
<MenuItem>Last Month</MenuItem>
|
||||
<MenuItem>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
<div className={styles.timelineList}>
|
||||
{ActivityTimelineData.slice(0, 6).map((timeline) => (
|
||||
<div className={styles.tList} key={timeline.id}>
|
||||
<div className={styles.content}>
|
||||
<img src={timeline.image} alt="Icon" />
|
||||
<h5>{timeline.title}</h5>
|
||||
</div>
|
||||
<p className={styles.date}>{timeline.time}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default ActivityTimeline;
|
||||
Reference in New Issue
Block a user