mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Change name from SafeReactNode to StrictReactNode
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
e88de58b5d
commit
d8823085a8
75 files changed
+219
-210
No files matched your search
@@ -7,13 +7,13 @@ import type { IconProps } from "../icon";
|
||||
import type React from "react";
|
||||
import type { PageTarget } from "../../routes/page-registration";
|
||||
import type { IComputedValue } from "mobx";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
|
||||
export interface ClusterPageMenuRegistration {
|
||||
id?: string;
|
||||
parentId?: string;
|
||||
target?: PageTarget;
|
||||
title: SafeReactNode;
|
||||
title: StrictReactNode;
|
||||
components: ClusterPageMenuComponents;
|
||||
visible?: IComputedValue<boolean>;
|
||||
orderNumber?: number;
|
||||
|
||||
@@ -7,7 +7,7 @@ import styles from "./main-layout.module.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { ErrorBoundary } from "@k8slens/error-boundary";
|
||||
import { ResizeDirection, ResizeGrowthDirection, ResizeSide, ResizingAnchor } from "@k8slens/resizing-anchor";
|
||||
@@ -17,10 +17,10 @@ import sidebarStorageInjectable, { defaultSidebarWidth } from "./sidebar-storage
|
||||
import type { StorageLayer } from "../../utils/storage-helper";
|
||||
|
||||
export interface MainLayoutProps {
|
||||
sidebar: SafeReactNode;
|
||||
sidebar: StrictReactNode;
|
||||
className?: string;
|
||||
footer?: SafeReactNode;
|
||||
children?: SafeReactNode;
|
||||
footer?: StrictReactNode;
|
||||
children?: StrictReactNode;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ import "./setting-layout.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName, SafeReactNode } from "@k8slens/utilities";
|
||||
import type { IClassName, StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { CloseButton } from "./close-button";
|
||||
import { getLegacyGlobalDiForExtensionApi } from "@k8slens/legacy-global-di";
|
||||
@@ -19,7 +19,7 @@ export interface SettingLayoutProps extends React.DOMAttributes<any> {
|
||||
contentClass?: IClassName;
|
||||
provideBackButtonNavigation?: boolean;
|
||||
contentGaps?: boolean;
|
||||
navigation?: SafeReactNode;
|
||||
navigation?: StrictReactNode;
|
||||
back?: (evt: React.MouseEvent | KeyboardEvent) => void;
|
||||
closeButtonProps?: { "data-testid"?: string };
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import React from "react";
|
||||
import siblingTabsInjectable from "../../routes/sibling-tabs.injectable";
|
||||
import { TabLayout } from "./tab-layout-2";
|
||||
import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
|
||||
interface SiblingTabLayoutProps {
|
||||
children: SafeReactNode;
|
||||
children: StrictReactNode;
|
||||
scrollable?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ import { computed } from "mobx";
|
||||
import { computedInjectManyInjectable } from "@ogre-tools/injectable-extension-for-mobx";
|
||||
import { byOrderNumber } from "../../../common/utils/composable-responsibilities/orderable/orderable";
|
||||
import type { SetRequired } from "type-fest";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
|
||||
export interface SidebarItemRegistration {
|
||||
id: string;
|
||||
parentId: string | null;
|
||||
title: SafeReactNode;
|
||||
title: StrictReactNode;
|
||||
onClick: () => void;
|
||||
getIcon?: () => SafeReactNode;
|
||||
getIcon?: () => StrictReactNode;
|
||||
isActive?: IComputedValue<boolean>;
|
||||
isVisible?: IComputedValue<boolean>;
|
||||
orderNumber: number;
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
|
||||
import "./sub-header.scss";
|
||||
import React from "react";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface SubHeaderProps {
|
||||
className?: string;
|
||||
withLine?: boolean; // add bottom line
|
||||
compact?: boolean; // no extra padding around content
|
||||
children: SafeReactNode;
|
||||
children: StrictReactNode;
|
||||
}
|
||||
|
||||
export class SubHeader extends React.Component<SubHeaderProps> {
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
|
||||
import "./sub-title.scss";
|
||||
import React from "react";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface SubTitleProps {
|
||||
className?: string;
|
||||
title: SafeReactNode;
|
||||
title: StrictReactNode;
|
||||
compact?: boolean; // no bottom padding
|
||||
id?: string;
|
||||
children?: SafeReactNode;
|
||||
children?: StrictReactNode;
|
||||
}
|
||||
|
||||
export class SubTitle extends React.Component<SubTitleProps> {
|
||||
|
||||
@@ -7,7 +7,7 @@ import "./tab-layout.scss";
|
||||
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { SafeReactNode } from "@k8slens/utilities";
|
||||
import type { StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { Tab, Tabs } from "../tabs";
|
||||
import { ErrorBoundary } from "@k8slens/error-boundary";
|
||||
@@ -15,7 +15,7 @@ import type { HierarchicalSidebarItem } from "./sidebar-items.injectable";
|
||||
|
||||
export interface TabLayoutProps {
|
||||
tabs?: HierarchicalSidebarItem[];
|
||||
children?: SafeReactNode;
|
||||
children?: StrictReactNode;
|
||||
scrollable?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import "./tab-layout.scss";
|
||||
import React from "react";
|
||||
import { matchPath, Redirect, Route, Switch } from "react-router";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName, SafeReactNode } from "@k8slens/utilities";
|
||||
import type { IClassName, StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
import { Tab, Tabs } from "../tabs";
|
||||
import { ErrorBoundary } from "@k8slens/error-boundary";
|
||||
@@ -22,13 +22,13 @@ export interface TabLayoutProps {
|
||||
className?: IClassName;
|
||||
contentClass?: IClassName;
|
||||
tabs?: TabLayoutRoute[];
|
||||
children?: SafeReactNode;
|
||||
children?: StrictReactNode;
|
||||
scrollable?: boolean;
|
||||
}
|
||||
|
||||
export interface TabLayoutRoute {
|
||||
routePath: string;
|
||||
title: SafeReactNode;
|
||||
title: StrictReactNode;
|
||||
component: React.ComponentType<any>;
|
||||
url?: string; // page-url, if not provided `routePath` is used (doesn't work when path has some :placeholder(s))
|
||||
exact?: boolean; // route-path matching rule
|
||||
|
||||
@@ -6,16 +6,16 @@
|
||||
import "./wizard-layout.scss";
|
||||
import React from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import type { IClassName, SafeReactNode } from "@k8slens/utilities";
|
||||
import type { IClassName, StrictReactNode } from "@k8slens/utilities";
|
||||
import { cssNames } from "@k8slens/utilities";
|
||||
|
||||
export interface WizardLayoutProps extends React.DOMAttributes<any> {
|
||||
className?: IClassName;
|
||||
header?: SafeReactNode;
|
||||
header?: StrictReactNode;
|
||||
headerClass?: IClassName;
|
||||
contentClass?: IClassName;
|
||||
infoPanelClass?: IClassName;
|
||||
infoPanel?: SafeReactNode;
|
||||
infoPanel?: StrictReactNode;
|
||||
centered?: boolean; // Centering content horizontally
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user