mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Simplify static Showability of a PreferenceItem
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
b33a445f41
commit
41a86fb2dd
@ -2,8 +2,6 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||||
*/
|
*/
|
||||||
import type { IComputedValue } from "mobx";
|
|
||||||
import { computed } from "mobx";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { HorizontalLine } from "../../../../renderer/components/horizontal-line/horizontal-line";
|
import { HorizontalLine } from "../../../../renderer/components/horizontal-line/horizontal-line";
|
||||||
import type { RootComposite } from "../../../../common/utils/composite/interfaces";
|
import type { RootComposite } from "../../../../common/utils/composite/interfaces";
|
||||||
@ -13,14 +11,14 @@ import type { Showable } from "../../../../common/utils/composable-responsibilit
|
|||||||
export type PreferenceTabsRoot =
|
export type PreferenceTabsRoot =
|
||||||
& Discriminable<"preference-tabs-root">
|
& Discriminable<"preference-tabs-root">
|
||||||
& RootComposite
|
& RootComposite
|
||||||
& Showable<IComputedValue<true>>
|
& Showable<true>
|
||||||
& { childSeparator: () => React.ReactElement };
|
& { childSeparator: () => React.ReactElement };
|
||||||
|
|
||||||
export const preferenceTabsRoot: PreferenceTabsRoot = {
|
export const preferenceTabsRoot: PreferenceTabsRoot = {
|
||||||
kind: "preference-tabs-root" as const,
|
kind: "preference-tabs-root" as const,
|
||||||
id: "preference-tabs",
|
id: "preference-tabs",
|
||||||
parentId: undefined,
|
parentId: undefined,
|
||||||
isShown: computed(() => true as const),
|
isShown: true as const,
|
||||||
|
|
||||||
childSeparator: () => (
|
childSeparator: () => (
|
||||||
<div style={{ padding: "0 10px" }}>
|
<div style={{ padding: "0 10px" }}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user