1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/components/layout/siblings-in-tab-layout.tsx
Jim Ehrismann 1ef74289ef
Release 6.2.5 (#6707)
* Release 6.2.5

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* Bump electron from 19.1.8 to 19.1.9 (#6686)

Bumps [electron](https://github.com/electron/electron) from 19.1.8 to 19.1.9.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v19.1.8...v19.1.9)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix race conditrion preventing window from opening (#6680)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix: remove excessive scrollbars from the TabLayout view (#6689)

* Remove excessive scrollbars from the TabLayout view

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Updating snapshots

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Updating snapshots harder

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

* Fix not being able to add custom helm repos (#6692)

* Add missing safety checks in unit tests for structured clone issues

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix not being able to add custom helm repos

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix crash in PersistentVolumeDetails (#6691)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix top-bar .separator width (#6706)

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
2022-12-06 17:45:27 -05:00

51 lines
1.3 KiB
TypeScript

/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
import { withInjectables } from "@ogre-tools/injectable-react";
import type { IComputedValue } from "mobx";
import { observer } from "mobx-react";
import React from "react";
import siblingTabsInjectable from "../../routes/sibling-tabs.injectable";
import { TabLayout } from "./tab-layout-2";
import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
interface SiblingTabLayoutProps {
children: React.ReactNode;
scrollable?: boolean;
}
interface Dependencies {
tabs: IComputedValue<HierarchicalSidebarItem[]>;
}
const NonInjectedSiblingsInTabLayout = observer(
({ tabs, children, ...other }: Dependencies & SiblingTabLayoutProps) => {
const dereferencedTabs = tabs.get();
if (dereferencedTabs.length) {
return (
<TabLayout
tabs={dereferencedTabs}
{...other}
>
{children}
</TabLayout>
);
}
return <>{children}</>;
},
);
export const SiblingsInTabLayout = withInjectables<Dependencies, SiblingTabLayoutProps>(
NonInjectedSiblingsInTabLayout,
{
getProps: (di, props) => ({
tabs: di.inject(siblingTabsInjectable),
...props,
}),
},
);