mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Enforce some naming conventions (#4813)
This commit is contained in:
1 parent
dc6615f98f
commit
0b32775d40
197 files changed
+630
-634
No files matched your search
@@ -8,10 +8,10 @@ import styles from "./close-button.module.scss";
|
||||
import React, { HTMLAttributes } from "react";
|
||||
import { Icon } from "../icon";
|
||||
|
||||
interface Props extends HTMLAttributes<HTMLDivElement> {
|
||||
export interface CloseButtonProps extends HTMLAttributes<HTMLDivElement> {
|
||||
}
|
||||
|
||||
export function CloseButton(props: Props) {
|
||||
export function CloseButton(props: CloseButtonProps) {
|
||||
return (
|
||||
<div {...props}>
|
||||
<div className={styles.closeButton} role="button" aria-label="Close">
|
||||
|
||||
@@ -16,7 +16,7 @@ import sidebarStorageInjectable, {
|
||||
SidebarStorageState,
|
||||
} from "./sidebar-storage/sidebar-storage.injectable";
|
||||
|
||||
interface Props {
|
||||
export interface MainLayoutProps {
|
||||
sidebar: React.ReactNode;
|
||||
className?: string;
|
||||
footer?: React.ReactNode;
|
||||
@@ -33,7 +33,7 @@ interface Dependencies {
|
||||
}
|
||||
|
||||
@observer
|
||||
class NonInjectedMainLayout extends React.Component<Props & Dependencies> {
|
||||
class NonInjectedMainLayout extends React.Component<MainLayoutProps & Dependencies> {
|
||||
onSidebarResize = (width: number) => {
|
||||
this.props.sidebarStorage.merge({ width });
|
||||
};
|
||||
@@ -69,7 +69,7 @@ class NonInjectedMainLayout extends React.Component<Props & Dependencies> {
|
||||
}
|
||||
}
|
||||
|
||||
export const MainLayout = withInjectables<Dependencies, Props>(
|
||||
export const MainLayout = withInjectables<Dependencies, MainLayoutProps>(
|
||||
NonInjectedMainLayout,
|
||||
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ import { isActiveRoute } from "../../navigation";
|
||||
import { withInjectables } from "@ogre-tools/injectable-react";
|
||||
import sidebarStorageInjectable, { SidebarStorageState } from "./sidebar-storage/sidebar-storage.injectable";
|
||||
|
||||
interface SidebarItemProps {
|
||||
export interface SidebarItemProps {
|
||||
/**
|
||||
* Unique id, used in storage and integration tests
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import { HelmSidebarItem } from "../+helm/sidebar-item";
|
||||
import { UserManagementSidebarItem } from "../+user-management/sidebar-item";
|
||||
import { CustomResourcesSidebarItem } from "../+custom-resources/sidebar-item";
|
||||
|
||||
interface SidebarProps {
|
||||
export interface SidebarProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,14 +7,14 @@ import "./sub-title.scss";
|
||||
import React from "react";
|
||||
import { cssNames } from "../../utils";
|
||||
|
||||
interface Props {
|
||||
export interface SubTitleProps {
|
||||
className?: string;
|
||||
title: React.ReactNode;
|
||||
compact?: boolean; // no bottom padding
|
||||
id?: string;
|
||||
}
|
||||
|
||||
export class SubTitle extends React.Component<Props> {
|
||||
export class SubTitle extends React.Component<SubTitleProps> {
|
||||
render() {
|
||||
const { className, compact, title, children, id } = this.props;
|
||||
const classNames = cssNames("SubTitle", className, {
|
||||
|
||||
Reference in new issue
Block a user