-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes it easier to reuse the NavBar + Container combo, especially for the personal calls app (which has a lot more routes than the super app).
- Loading branch information
1 parent
3cda1cf
commit 9adbb10
Showing
3 changed files
with
40 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import React from 'react'; | ||
import { Box} from '@mui/material'; | ||
import { NavBar } from './navbar'; | ||
import { Container } from '../common/components'; | ||
import './navbar/NavBarAbove.css'; | ||
|
||
interface NavBarContainerProps { | ||
children: React.ReactNode; | ||
containerStyle?: React.CSSProperties; | ||
aboveStyle?: React.CSSProperties; | ||
} | ||
|
||
export function NavBarContainer<T extends NavBarContainerProps>(props: T) { | ||
const { | ||
children, | ||
aboveStyle, | ||
containerStyle, | ||
...rest | ||
} = props | ||
|
||
|
||
return <Container {...rest} style={containerStyle}> | ||
<Box | ||
className="navbar-above" | ||
style={aboveStyle} | ||
> | ||
{children} | ||
</Box> | ||
<NavBar /> | ||
</Container>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { NavBar } from './navbar'; | ||
export { NavBarContainer } from './NavBarContainer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters