generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9210486
commit 8779545
Showing
6 changed files
with
148 additions
and
105 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
13 changes: 13 additions & 0 deletions
13
cats-frontend/src/app/components/navigation-bar/INavigationBar.ts
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,13 @@ | ||
import { ReactNode } from "react"; | ||
|
||
export interface NavigationBarProps { | ||
isVisible: boolean; | ||
backButtonText: any; | ||
backButtonProps?: any; | ||
onClickBackButton?: () => void; | ||
navigationBarText?:any; | ||
customContainerCss?: string; | ||
customNavigationBarTxtCss?: string; | ||
customChildernCss?: string; | ||
childern?: any; | ||
} |
36 changes: 36 additions & 0 deletions
36
cats-frontend/src/app/components/navigation-bar/NavigationBar.css
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,36 @@ | ||
.custom-navigation-bar-header { | ||
padding: var(--layout-margin-large) var(--layout-margin-xxlarge) | ||
0 var(--layout-margin-xxlarge); | ||
gap: var(--layout-margin-xxlarge); | ||
} | ||
.custom-navigation-bar-sticky-header { | ||
position: -webkit-sticky; /* For Safari */ | ||
position: sticky; | ||
z-index: 999 !important; | ||
top: 65px; | ||
left: 128px; | ||
padding: var(--layout-margin-large) var(--layout-margin-xxlarge) | ||
var(--layout-margin-large) var(--layout-margin-xxlarge); | ||
gap: var(--layout-margin-xxlarge); | ||
background: var(--surface-background-white, #ffffff); | ||
border-bottom: 1px solid var(--surface-border-light, #d8d8d8); | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.custom-navigation-bar-sticky-header { | ||
align-items: flex-start !important; | ||
} | ||
} | ||
|
||
.custom-navigation-bar-sticky-header-lbl { | ||
font-size: 14px; | ||
font-weight: 700; | ||
line-height: 21.01px; | ||
text-align: left; | ||
color: var(--typography-color-primary, #2d2d2d); | ||
} | ||
|
||
.custom-navigation-bar-sticky-header-lbl > div > span { | ||
font-weight: 400; | ||
padding-left: 8px; | ||
} |
36 changes: 36 additions & 0 deletions
36
cats-frontend/src/app/components/navigation-bar/NavigationBar.tsx
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,36 @@ | ||
import { Button } from "../button/Button"; | ||
import { AngleLeft } from "../common/icon"; | ||
import { NavigationBarProps } from "./INavigationBar"; | ||
import './NavigationBar.css'; | ||
|
||
const NavigationBar: React.FC<NavigationBarProps> = ({ | ||
isVisible, | ||
backButtonText, | ||
backButtonProps, | ||
navigationBarText, | ||
customContainerCss, | ||
customNavigationBarTxtCss, | ||
customChildernCss, | ||
childern, | ||
onClickBackButton, | ||
}) =>{ | ||
return ( | ||
<div className={`d-flex justify-content-between align-items-center ${isVisible ? 'custom-navigation-bar-sticky-header' : 'custom-navigation-bar-header'} w-100 ${customContainerCss ?? ''}`}> | ||
<div className="d-flex gap-4 flex-wrap align-items-center"> | ||
<Button onClick={onClickBackButton} {...backButtonProps}> | ||
<AngleLeft /> | ||
{backButtonText} | ||
</Button> | ||
<div className={`d-flex flex-wrap align-items-center pe-3 custom-navigation-bar-sticky-header-lbl ${customNavigationBarTxtCss ?? ''}`}> | ||
{ navigationBarText } | ||
</div> | ||
</div> | ||
|
||
<div className={`d-flex gap-2 justify-align-center pe-2 position-relative ${customChildernCss ?? ''}`}> | ||
{childern} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default NavigationBar; |
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
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