fix: sidebar toggle button on workspace dashboard (#1389)

This commit is contained in:
Aaryan Khandelwal 2023-06-24 18:12:11 +05:30 committed by GitHub
parent fd30ea9a20
commit 06ce89a03a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 18 deletions

View File

@ -6,10 +6,15 @@ type Props = {
left?: JSX.Element; left?: JSX.Element;
right?: JSX.Element; right?: JSX.Element;
setToggleSidebar: React.Dispatch<React.SetStateAction<boolean>>; setToggleSidebar: React.Dispatch<React.SetStateAction<boolean>>;
noHeader: boolean;
}; };
const Header: React.FC<Props> = ({ breadcrumbs, left, right, setToggleSidebar }) => ( const Header: React.FC<Props> = ({ breadcrumbs, left, right, setToggleSidebar, noHeader }) => (
<div className="relative flex w-full flex-shrink-0 flex-row items-center justify-between gap-y-4 border-b border-brand-base bg-brand-sidebar px-5 py-4"> <div
className={`relative flex w-full flex-shrink-0 flex-row items-center justify-between gap-y-4 border-b border-brand-base bg-brand-sidebar px-5 py-4 ${
noHeader ? "md:hidden" : ""
}`}
>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<div className="block md:hidden"> <div className="block md:hidden">
<button <button

View File

@ -100,14 +100,13 @@ const ProjectAuthorizationWrapped: React.FC<Props> = ({
: "bg-brand-base" : "bg-brand-base"
}`} }`}
> >
{!noHeader && (
<AppHeader <AppHeader
breadcrumbs={breadcrumbs} breadcrumbs={breadcrumbs}
left={left} left={left}
right={right} right={right}
setToggleSidebar={setToggleSidebar} setToggleSidebar={setToggleSidebar}
noHeader={noHeader}
/> />
)}
<div className="h-full w-full overflow-hidden"> <div className="h-full w-full overflow-hidden">
<div className="h-full w-full overflow-x-hidden overflow-y-scroll">{children}</div> <div className="h-full w-full overflow-x-hidden overflow-y-scroll">{children}</div>
</div> </div>

View File

@ -107,14 +107,13 @@ export const WorkspaceAuthorizationLayout: React.FC<Props> = ({
: "bg-brand-base" : "bg-brand-base"
}`} }`}
> >
{!noHeader && (
<AppHeader <AppHeader
breadcrumbs={breadcrumbs} breadcrumbs={breadcrumbs}
left={left} left={left}
right={right} right={right}
setToggleSidebar={setToggleSidebar} setToggleSidebar={setToggleSidebar}
noHeader={noHeader}
/> />
)}
<div className="h-full w-full overflow-hidden"> <div className="h-full w-full overflow-hidden">
<div className="relative h-full w-full overflow-x-hidden overflow-y-scroll"> <div className="relative h-full w-full overflow-x-hidden overflow-y-scroll">
{children} {children}