fix: Don't crash when hovering hotbar menu index

- Remove all uses of React.ReactNode as it is unsafe, replace them with
  usages of SafeReactNode which doesn't contain the '{}' type

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-05-15 11:56:30 -04:00
1 parent f13a145a27
commit 9d51ef2aa6
84 files changed
+246 -208

No files matched your search

+3 -2
View File
@@ -6,11 +6,11 @@
import "./button.scss";
import type { ButtonHTMLAttributes } from "react";
import React from "react";
import { cssNames } from "@k8slens/utilities";
import { cssNames, SafeReactNode, SingleOrMany } from "@k8slens/utilities";
import { withTooltip } from "@k8slens/tooltip";
export interface ButtonProps extends ButtonHTMLAttributes<any> {
label?: React.ReactNode;
label?: SafeReactNode;
waiting?: boolean;
primary?: boolean;
accent?: boolean;
@@ -23,6 +23,7 @@ export interface ButtonProps extends ButtonHTMLAttributes<any> {
round?: boolean;
href?: string; // render as hyperlink
target?: "_blank"; // in case of using @href
children?: SingleOrMany<SafeReactNode>;
}
export const Button = withTooltip((props: ButtonProps) => {