Files
plane/web/core/components/sidebar/sidebar-navigation.tsx
Anmol Singh Bhatia a7ecfade98 [WEB-1920] dev: app sidebar revamp (#5150)
* chore: user activity icon added

* dev: sidebar navigation component added

* chore: dashboard constant file updated

* chore: unread notification indicator position

* chore: app sidebar project section

* chore: app sidebar User and Workspace section updated

* chore: notification to inbox transition

* chore: code refactor

* chore: code refactor
2024-07-18 12:56:33 +05:30

30 lines
791 B
TypeScript

"use client";
import React, { FC } from "react";
// helpers
import { cn } from "@/helpers/common.helper";
type TSidebarNavItem = {
className?: string;
isActive?: boolean;
children?: React.ReactNode;
};
export const SidebarNavItem: FC<TSidebarNavItem> = (props) => {
const { className, isActive, children } = props;
return (
<div
className={cn(
"cursor-pointer relative group w-full flex items-center justify-between gap-1.5 rounded px-2 py-1 outline-none",
{
"text-custom-primary-200 bg-custom-primary-100/10": isActive,
"text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-90 active:bg-custom-sidebar-background-90":
!isActive,
},
className
)}
>
{children}
</div>
);
};