mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
5916d6e749
* fix: cycle and module sidebar scroll * style: date picker theming * style: workspace slug spacing * fix: app sidebar z-index * fix: favorite cycle mutation * fix: cycle modal on error close * feat: cycle view context * style: active cycle stats scroll * fix: active cycle favorite mutation * feat: import export banner * feat: cycle sidebar date picker logic updated * fix: NaN in progress percentage fix * fix: tooltip fix * style: empty state for active cycle * style: cycle badge width fix , all cycle empty state fix and cycle icon size fix
39 lines
1.1 KiB
TypeScript
39 lines
1.1 KiB
TypeScript
// hooks
|
|
import useTheme from "hooks/use-theme";
|
|
// components
|
|
import {
|
|
WorkspaceHelpSection,
|
|
WorkspaceSidebarDropdown,
|
|
WorkspaceSidebarMenu,
|
|
} from "components/workspace";
|
|
import { ProjectSidebarList } from "components/project";
|
|
|
|
export interface SidebarProps {
|
|
toggleSidebar: boolean;
|
|
setToggleSidebar: React.Dispatch<React.SetStateAction<boolean>>;
|
|
}
|
|
|
|
const Sidebar: React.FC<SidebarProps> = ({ toggleSidebar, setToggleSidebar }) => {
|
|
// theme
|
|
const { collapsed: sidebarCollapse } = useTheme();
|
|
|
|
return (
|
|
<div
|
|
className={`z-20 h-full flex-shrink-0 border-r border-brand-base ${
|
|
sidebarCollapse ? "" : "w-auto md:w-[17rem]"
|
|
} fixed inset-y-0 top-0 ${
|
|
toggleSidebar ? "left-0" : "-left-full md:left-0"
|
|
} flex h-full flex-col bg-brand-sidebar duration-300 md:relative`}
|
|
>
|
|
<div className="flex h-full flex-1 flex-col">
|
|
<WorkspaceSidebarDropdown />
|
|
<WorkspaceSidebarMenu />
|
|
<ProjectSidebarList />
|
|
<WorkspaceHelpSection setSidebarActive={setToggleSidebar} />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default Sidebar;
|