Add bgColor behind selected project in menu
This commit is contained in:
@@ -15,7 +15,7 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
Box,
|
Box,
|
||||||
} from "@chakra-ui/react";
|
} from "@chakra-ui/react";
|
||||||
import React, { useEffect, useState } from "react";
|
import { useEffect } from "react";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { BsPlus, BsPersonCircle } from "react-icons/bs";
|
import { BsPlus, BsPersonCircle } from "react-icons/bs";
|
||||||
import { type Project } from "@prisma/client";
|
import { type Project } from "@prisma/client";
|
||||||
@@ -105,8 +105,8 @@ export default function ProjectMenu() {
|
|||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
<PopoverContent
|
<PopoverContent
|
||||||
_focusVisible={{ outline: "unset" }}
|
_focusVisible={{ outline: "unset" }}
|
||||||
ml={-1}
|
w={220}
|
||||||
w={224}
|
ml={{ base: 2, md: 0 }}
|
||||||
boxShadow="0 0 40px 4px rgba(0, 0, 0, 0.1);"
|
boxShadow="0 0 40px 4px rgba(0, 0, 0, 0.1);"
|
||||||
fontSize="sm"
|
fontSize="sm"
|
||||||
>
|
>
|
||||||
@@ -176,7 +176,6 @@ const ProjectOption = ({
|
|||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const setSelectedProjectId = useAppStore((s) => s.setSelectedProjectId);
|
const setSelectedProjectId = useAppStore((s) => s.setSelectedProjectId);
|
||||||
const [gearHovered, setGearHovered] = useState(false);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<HStack
|
<HStack
|
||||||
@@ -188,8 +187,8 @@ const ProjectOption = ({
|
|||||||
}}
|
}}
|
||||||
w="full"
|
w="full"
|
||||||
justifyContent="space-between"
|
justifyContent="space-between"
|
||||||
_hover={gearHovered ? undefined : { bgColor: "gray.200", textDecoration: "none" }}
|
_hover={{ bgColor: "gray.200", textDecoration: "none" }}
|
||||||
color={isActive ? "blue.400" : undefined}
|
bgColor={isActive ? "gray.100" : undefined}
|
||||||
py={2}
|
py={2}
|
||||||
px={4}
|
px={4}
|
||||||
borderRadius={4}
|
borderRadius={4}
|
||||||
|
|||||||
Reference in New Issue
Block a user