feat(side-bars-wrapper): add component content and logic

This commit is contained in:
RadoslavDimchev 2024-03-27 09:28:35 +02:00 committed by Radoslav Dimchev
parent fbe6dcb21a
commit 90bbc345ad
1 changed files with 29 additions and 2 deletions

View File

@ -1,5 +1,32 @@
const SideBarsWrapper = () => {
return <div></div>
import { ReactNode } from 'react'
import { XStack } from 'tamagui'
import LeftSidebar from '../General/LeftSidebar/LeftSidebar'
import RightSidebar from '../General/RightSideBar/RightSidebar'
import styles from './side-bars-wrapper.module.css'
type SideBardsWrapperProps = {
children: ReactNode
isNotLeftSideBar?: boolean
isNotRightSideBar?: boolean
}
const SideBarsWrapper = ({
children,
isNotLeftSideBar,
isNotRightSideBar,
}: SideBardsWrapperProps) => {
return (
<XStack style={{ height: '100vh' }}>
{!isNotLeftSideBar && <LeftSidebar />}
{children}
{!isNotRightSideBar && (
<div className={styles['right-sidebar-wrapper']}>
<RightSidebar />
</div>
)}
</XStack>
)
}
export default SideBarsWrapper