mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Removing sidebar compact view
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
16e50a7cb5
commit
7512b62dab
@ -23,7 +23,6 @@ import { createStorage } from "../../utils";
|
||||
|
||||
export interface SidebarStorageState {
|
||||
width: number;
|
||||
compact: boolean;
|
||||
expanded: {
|
||||
[itemId: string]: boolean;
|
||||
}
|
||||
@ -31,6 +30,5 @@ export interface SidebarStorageState {
|
||||
|
||||
export const sidebarStorage = createStorage<SidebarStorageState>("sidebar", {
|
||||
width: 200, // sidebar size in non-compact mode
|
||||
compact: false, // compact-mode (icons only)
|
||||
expanded: {},
|
||||
});
|
||||
|
||||
@ -52,8 +52,6 @@ import { SidebarItem } from "./sidebar-item";
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
compact?: boolean; // compact-mode view: show only icons and expand on :hover
|
||||
toggle(): void; // compact-mode updater
|
||||
}
|
||||
|
||||
@observer
|
||||
@ -173,24 +171,17 @@ export class Sidebar extends React.Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { toggle, compact, className } = this.props;
|
||||
const { className } = this.props;
|
||||
|
||||
return (
|
||||
<div className={cssNames(Sidebar.displayName, "flex column", { compact }, className)}>
|
||||
<div className={cssNames(Sidebar.displayName, "flex column", className)}>
|
||||
<div className="header flex align-center">
|
||||
<NavLink exact to="/" className="box grow">
|
||||
<Icon svg="logo-lens" className="logo-icon"/>
|
||||
<div className="logo-text">Lens</div>
|
||||
</NavLink>
|
||||
<Icon
|
||||
focusable={false}
|
||||
className="pin-icon"
|
||||
tooltip="Compact view"
|
||||
material={compact ? "keyboard_arrow_right" : "keyboard_arrow_left"}
|
||||
onClick={toggle}
|
||||
/>
|
||||
</div>
|
||||
<div className={cssNames("sidebar-nav flex column box grow-fixed", { compact })}>
|
||||
<div className={cssNames("sidebar-nav flex column box grow-fixed")}>
|
||||
<SidebarItem
|
||||
id="cluster"
|
||||
text="Cluster"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user