Enforce some naming conventions (#4813)

This commit is contained in:
Sebastian Malton authored and GitHub committed 2022-03-01 13:06:53 -05:00
1 parent dc6615f98f
commit 0b32775d40
197 files changed
+630 -634

No files matched your search

@@ -8,13 +8,13 @@ import React, { HTMLAttributes, ReactNode, useState } from "react";
import { cssNames } from "../../utils";
interface Props extends HTMLAttributes<HTMLDivElement> {
export interface HotbarCellProps extends HTMLAttributes<HTMLDivElement> {
children?: ReactNode;
index: number;
innerRef?: React.Ref<HTMLDivElement>;
}
export function HotbarCell({ innerRef, children, className, ...rest }: Props) {
export function HotbarCell({ innerRef, children, className, ...rest }: HotbarCellProps) {
const [animating, setAnimating] = useState(false);
const onAnimationEnd = () => { setAnimating(false); };
const onClick = () => {
@@ -18,7 +18,7 @@ import { Icon } from "../icon";
import { HotbarIcon } from "./hotbar-icon";
import { LensKubernetesClusterStatus } from "../../../common/catalog-entities/kubernetes-cluster";
interface Props extends HTMLAttributes<HTMLElement> {
export interface HotbarEntityIconProps extends HTMLAttributes<HTMLElement> {
entity: CatalogEntity;
index: number;
errorClass?: IClassName;
@@ -28,13 +28,13 @@ interface Props extends HTMLAttributes<HTMLElement> {
}
@observer
export class HotbarEntityIcon extends React.Component<Props> {
export class HotbarEntityIcon extends React.Component<HotbarEntityIconProps> {
@observable private contextMenu: CatalogEntityContextMenuContext = {
menuItems: [],
navigate: (url: string) => navigate(url),
};
constructor(props: Props) {
constructor(props: HotbarEntityIconProps) {
super(props);
makeObservable(this);
}
@@ -16,7 +16,7 @@ import { Avatar, AvatarProps } from "../avatar";
import { Icon } from "../icon";
import { Tooltip } from "../tooltip";
export interface Props extends AvatarProps {
export interface HotbarIconProps extends AvatarProps {
uid: string;
source: string;
material?: string;
@@ -44,7 +44,7 @@ function onMenuItemClick(menuItem: CatalogEntityContextMenu) {
}
}
export const HotbarIcon = observer(({ menuItems = [], size = 40, tooltip, ...props }: Props) => {
export const HotbarIcon = observer(({ menuItems = [], size = 40, tooltip, ...props }: HotbarIconProps) => {
const { uid, title, src, material, active, className, source, disabled, onMenuOpen, onClick, children, ...rest } = props;
const id = `hotbarIcon-${uid}`;
const [menuOpen, setMenuOpen] = useState(false);
@@ -19,15 +19,15 @@ import { HotbarIcon } from "./hotbar-icon";
import { defaultHotbarCells, HotbarItem } from "../../../common/hotbar-types";
import { action, makeObservable, observable } from "mobx";
interface Props {
export interface HotbarMenuProps {
className?: IClassName;
}
@observer
export class HotbarMenu extends React.Component<Props> {
export class HotbarMenu extends React.Component<HotbarMenuProps> {
@observable draggingOver = false;
constructor(props: Props) {
constructor(props: HotbarMenuProps) {
super(props);
makeObservable(this);
}