Browse Source

update menu item prop prefixes, minor fixes

sergei 3 years ago
parent
commit
4559a71efa

+ 2 - 2
kafka-ui-react-app/src/components/Nav/ClusterMenuItem/ClusterMenuItem.styled.ts

@@ -1,6 +1,6 @@
 import styled from 'styled-components';
 import styled from 'styled-components';
 
 
-export interface Props {
+export interface MenuItemProps {
   liType: 'primary';
   liType: 'primary';
   to?: string;
   to?: string;
   activeClassName?: string;
   activeClassName?: string;
@@ -8,7 +8,7 @@ export interface Props {
   isInverted?: boolean;
   isInverted?: boolean;
 }
 }
 
 
-const StyledMenuItem = styled('li')<Props>`
+const StyledMenuItem = styled.li<MenuItemProps>`
   a {
   a {
     cursor: pointer;
     cursor: pointer;
     text-decoration: none;
     text-decoration: none;

+ 3 - 3
kafka-ui-react-app/src/components/Nav/ClusterMenuItem/ClusterMenuItem.tsx

@@ -1,12 +1,12 @@
 import StyledMenuItem, {
 import StyledMenuItem, {
-  Props as MenuItemProps,
+  MenuItemProps,
 } from 'components/Nav/ClusterMenuItem/ClusterMenuItem.styled';
 } from 'components/Nav/ClusterMenuItem/ClusterMenuItem.styled';
 import React from 'react';
 import React from 'react';
 import { NavLink } from 'react-router-dom';
 import { NavLink } from 'react-router-dom';
 
 
-export type Props = MenuItemProps;
+export type { MenuItemProps };
 
 
-const ClusterMenuItem: React.FC<Props> = (props) => {
+const ClusterMenuItem: React.FC<MenuItemProps> = (props) => {
   const { to, activeClassName, title, children, liType, ...rest } = props;
   const { to, activeClassName, title, children, liType, ...rest } = props;
 
 
   if (to) {
   if (to) {

+ 1 - 1
kafka-ui-react-app/src/components/Nav/__tests__/ClusterMenuItem.spec.tsx

@@ -2,7 +2,7 @@ import React from 'react';
 import { mount } from 'enzyme';
 import { mount } from 'enzyme';
 import { StaticRouter } from 'react-router';
 import { StaticRouter } from 'react-router';
 import ClusterMenuItem, {
 import ClusterMenuItem, {
-  Props as MenuItemProps,
+  MenuItemProps,
 } from 'components/Nav/ClusterMenuItem/ClusterMenuItem';
 } from 'components/Nav/ClusterMenuItem/ClusterMenuItem';
 
 
 describe('ClusterMenuItem', () => {
 describe('ClusterMenuItem', () => {