mirror of
https://github.com/gnmyt/LicenseAPI.git
synced 2026-01-11 10:41:46 +00:00
Update ProjectBox.jsx
This commit is contained in:
@ -3,11 +3,8 @@ import {ProjectContext} from "@/states/Dashboard/contexts/Project";
|
||||
import {useContext} from "react";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
|
||||
export const ProjectBox = ({project}) => {
|
||||
export const ProjectBox = ({project, style}) => {
|
||||
|
||||
const boxStyle = {cursor: "pointer", "&:hover": {backgroundColor: "#eee"},
|
||||
"&:active": {backgroundColor: "#ddd", scale: "0.95"}, "&:focus": {outline: "none"},
|
||||
transition: "all 0.1s ease-in-out", userSelect: "none"}
|
||||
|
||||
const {setCurrentProject} = useContext(ProjectContext);
|
||||
const navigate = useNavigate();
|
||||
@ -19,7 +16,7 @@ export const ProjectBox = ({project}) => {
|
||||
|
||||
return (
|
||||
<Box justifyContent="center" alignItems="center" display="flex" borderRadius="10px"
|
||||
border="1px solid #ccc" p={2.5} sx={boxStyle} onClick={switchProject}>
|
||||
border="1px solid #ccc" p={2.5} sx={style} onClick={switchProject}>
|
||||
<Avatar sx={{width: "50px", height: "50px", marginRight: "10px"}} variant="rounded">
|
||||
{project.name.charAt(0).toUpperCase()}
|
||||
</Avatar>
|
||||
|
||||
Reference in New Issue
Block a user