feat: changed user icon

This commit is contained in:
=
2025-01-21 01:34:21 +05:30
parent 23513158ed
commit 78e894c2bb
4 changed files with 13 additions and 12 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -14,8 +14,10 @@ export const MenuIconButton = <T extends ElementType = "button">({
description, description,
// wrapping in forward ref with generic component causes the loss of ts definitions on props // wrapping in forward ref with generic component causes the loss of ts definitions on props
inputRef, inputRef,
lottieIconMode = "forward",
...props ...props
}: MenuItemProps<T> & ComponentPropsWithRef<T>): JSX.Element => { }: MenuItemProps<T> &
ComponentPropsWithRef<T> & { lottieIconMode?: "reverse" | "forward" }): JSX.Element => {
const iconRef = useRef<DotLottie | null>(null); const iconRef = useRef<DotLottie | null>(null);
return ( return (
<Item <Item
@@ -46,6 +48,7 @@ export const MenuIconButton = <T extends ElementType = "button">({
src={`/lotties/${icon}.json`} src={`/lotties/${icon}.json`}
loop loop
className="h-full w-full" className="h-full w-full"
mode={lottieIconMode}
/> />
</div> </div>
)} )}
@@ -5,7 +5,6 @@ import {
faBook, faBook,
faCheck, faCheck,
faCog, faCog,
faEllipsis,
faEnvelope, faEnvelope,
faInfinity, faInfinity,
faInfo, faInfo,
@@ -309,11 +308,12 @@ export const MinimizedOrgSidebar = () => {
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<div className="w-full"> <div className="w-full">
<MenuIconButton isSelected={isMoreSelected}> <MenuIconButton
<div className="relative flex flex-col items-center justify-center"> lottieIconMode="reverse"
<FontAwesomeIcon icon={faEllipsis} className="mb-3 text-lg" /> icon="three-ellipsis"
<span>More</span> isSelected={isMoreSelected}
</div> >
More
</MenuIconButton> </MenuIconButton>
</div> </div>
</DropdownMenuTrigger> </DropdownMenuTrigger>
@@ -410,11 +410,7 @@ export const MinimizedOrgSidebar = () => {
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger className="w-full" asChild> <DropdownMenuTrigger className="w-full" asChild>
<div> <div>
<MenuIconButton> <MenuIconButton icon="user">User</MenuIconButton>
<div className="my-1 flex h-6 w-6 items-center justify-center rounded-md bg-primary text-sm uppercase text-black">
{user?.firstName?.charAt(0)}
</div>
</MenuIconButton>
</div> </div>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent align="start" className="p-1"> <DropdownMenuContent align="start" className="p-1">