Skip to content

Commit

Permalink
Add sidebar position prop
Browse files Browse the repository at this point in the history
  • Loading branch information
dgcohen committed Oct 11, 2023
1 parent 4c5f298 commit 6bc4669
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { BASE_URL } from "../../config/constants"
interface LayoutProps {
sidebar?: ReactElement
activePage?: RCPage
sidebarPosition?: "right" | "left"
}

/**
Expand All @@ -26,6 +27,7 @@ const Layout = ({
children,
sidebar,
activePage,
sidebarPosition = "right",
}: PropsWithChildren<LayoutProps>) => {
const showSearch = activePage === "search"
const showHeader = activePage !== "404"
Expand Down Expand Up @@ -55,7 +57,7 @@ const Layout = ({
</>
)
}
sidebar={sidebar ? "right" : "none"}
sidebar={sidebar ? sidebarPosition : "none"}
contentPrimary={<Box pb="l">{children}</Box>}
contentSidebar={
sidebar && (
Expand Down

0 comments on commit 6bc4669

Please sign in to comment.