forked from github/plane
3c2f5d12ed
* chore: add next theme and initial setup * chore: add dark mode colors to layouts * chore: user general setting page theming * chore: dashboard theming * chore: project page theming * chore: workspace setting page theming * chore: my issue page theming * chore: cmdk theming * chore: change hardcode bg and text color to theme * chore: change color name according to the design * style: fix card in the dashboard * style: fix merge conflict design issues * style: add light high contrast and dark high contrast * style: fix cmd k menu color and selection * feat: change theme from cmdk menu * chore: add multiple theme field to custom theme * chore: removed custom theming * fix: build error --------- Co-authored-by: Saheb Giri <iamsahebgiri@gmail.com>
41 lines
1.2 KiB
TypeScript
41 lines
1.2 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 (
|
|
<nav className="relative z-20 h-screen">
|
|
<div
|
|
className={`${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 border-r border-brand-base">
|
|
<div className="flex h-full flex-1 flex-col">
|
|
<WorkspaceSidebarDropdown />
|
|
<WorkspaceSidebarMenu />
|
|
<ProjectSidebarList />
|
|
<WorkspaceHelpSection setSidebarActive={setToggleSidebar} />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
);
|
|
};
|
|
|
|
export default Sidebar;
|