Skip to content

Commit

Permalink
chore: renamed the left prop as sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
aum-deriv committed Feb 1, 2024
1 parent 09f6833 commit c0e3cab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/components/PageLayout/PageLayout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
flex-direction: column;
}

&__left {
&__sidebar {
display: flex;
flex-direction: column;
}
Expand Down
6 changes: 3 additions & 3 deletions lib/components/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { useDevice } from '../../hooks/useDevice';
import './PageLayout.scss';

type PageLayoutProps = {
left?: JSX.Element;
sidebar?: JSX.Element;
};

export const PageLayout: React.FC<React.PropsWithChildren<PageLayoutProps>> = ({children, left}) => {
export const PageLayout: React.FC<React.PropsWithChildren<PageLayoutProps>> = ({children, sidebar}) => {
const {isMobile} = useDevice();

return <div className="derivs-page-layout">
{left && !isMobile && <div className="derivs-page-layout__left">{left}</div>}
{sidebar && !isMobile && <div className="derivs-page-layout__sidebar">{sidebar}</div>}
{children && <div className="derivs-page-layout__content">{children}</div>}
</div>
}

0 comments on commit c0e3cab

Please sign in to comment.