first commit
This commit is contained in:
@@ -0,0 +1,241 @@
|
||||
import React, { Component } from "react";
|
||||
import { Box, Typography } from "@mui/material";
|
||||
import Link from "@mui/material/Link";
|
||||
import dynamic from "next/dynamic";
|
||||
const Chart = dynamic(() => import("react-apexcharts"), {
|
||||
ssr: false,
|
||||
});
|
||||
|
||||
class CourseCompletionList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
series: [25],
|
||||
series2: [50],
|
||||
series3: [30],
|
||||
series4: [50],
|
||||
options: {
|
||||
chart: {
|
||||
offsetX: -8,
|
||||
},
|
||||
plotOptions: {
|
||||
radialBar: {
|
||||
hollow: {
|
||||
size: "50%",
|
||||
},
|
||||
track: {
|
||||
background: "#A9C8FB",
|
||||
},
|
||||
dataLabels: {
|
||||
name: {
|
||||
show: false,
|
||||
},
|
||||
value: {
|
||||
offsetY: 3,
|
||||
color: "#757FEF",
|
||||
fontSize: "13px",
|
||||
fontWeight: "500",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
fill: {
|
||||
colors: ["#757FEF"],
|
||||
opacity: 1,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
{/* Course completion 1 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box className="mr-1">
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Data With Python
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
5 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 2 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series2}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Code Foundation
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
15 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 3 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series3}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Styling With CSS
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
13 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
{/* Course completion 4 */}
|
||||
<Box
|
||||
sx={{
|
||||
background: "#FAFAFA",
|
||||
borderRadius: "15px",
|
||||
padding: "5px 20px",
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
mt: "15px",
|
||||
}}
|
||||
className="dark-BG-101010"
|
||||
>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "space-between",
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Chart
|
||||
options={this.state.options}
|
||||
series={this.state.series4}
|
||||
type="radialBar"
|
||||
height={110}
|
||||
width={70}
|
||||
/>
|
||||
</Box>
|
||||
<Box>
|
||||
<Typography as="h3" fontSize="14px" fontWeight="500">
|
||||
Code Learn
|
||||
</Typography>
|
||||
<Typography fontSize="13px" color="#A9A9C8">
|
||||
15 Lessons
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
<Box color="#A9A9C8" fontSize="25px">
|
||||
<Link href="#" underline="none">
|
||||
<i className="ri-arrow-right-s-line"></i>
|
||||
</Link>
|
||||
</Box>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CourseCompletionList;
|
||||
@@ -0,0 +1,111 @@
|
||||
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 CourseCompletionList from "./CourseCompletionList";
|
||||
|
||||
const CourseCompletion = () => {
|
||||
// Dropdown
|
||||
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,
|
||||
}}
|
||||
>
|
||||
Course Completion
|
||||
</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 sx={{ fontSize: '14px' }}>Last 15 Days</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Month</MenuItem>
|
||||
<MenuItem sx={{ fontSize: '14px' }}>Last Year</MenuItem>
|
||||
</Menu>
|
||||
</Box>
|
||||
|
||||
{/* CourseCompletionList */}
|
||||
<CourseCompletionList />
|
||||
</Card>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default CourseCompletion;
|
||||
Reference in New Issue
Block a user