forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: system level extensions (argoproj#10758)
* feat: sidebar extensions Signed-off-by: Remington Breeze <remington@breeze.software>
- Loading branch information
1 parent
55eca59
commit f87a3bc
Showing
6 changed files
with
182 additions
and
74 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
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
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,20 +1,22 @@ | ||
import * as React from 'react'; | ||
import {Sidebar} from '../../../sidebar/sidebar'; | ||
import {ViewPreferences} from '../../services'; | ||
|
||
require('./layout.scss'); | ||
|
||
export interface LayoutProps { | ||
navItems: Array<{path: string; iconClassName: string; title: string}>; | ||
onVersionClick?: () => void; | ||
theme?: string; | ||
children?: React.ReactNode; | ||
pref: ViewPreferences; | ||
isExtension?: boolean; | ||
} | ||
|
||
export const Layout = (props: LayoutProps) => ( | ||
<div className={props.theme ? 'theme-' + props.theme : 'theme-light'}> | ||
<div className='cd-layout'> | ||
<Sidebar onVersionClick={props.onVersionClick} navItems={props.navItems} /> | ||
{props.children} | ||
<div className={props.pref.theme ? 'theme-' + props.pref.theme : 'theme-light'}> | ||
<div className={`cd-layout ${props.isExtension ? 'cd-layout--extension' : ''}`}> | ||
<Sidebar onVersionClick={props.onVersionClick} navItems={props.navItems} pref={props.pref} /> | ||
<div className={`cd-layout__content ${props.pref.hideSidebar ? 'cd-layout__content--sb-collapsed' : 'cd-layout__content--sb-expanded'}`}>{props.children}</div> | ||
</div> | ||
</div> | ||
); |
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
Oops, something went wrong.