Skip to content

Commit

Permalink
fix: improve types
Browse files Browse the repository at this point in the history
  • Loading branch information
haideralsh committed Sep 6, 2024
1 parent 1982706 commit 46d15af
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/BrandedNavBar/MobileMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { BrandingText } from "../Branding";
import { DropdownLink, DropdownText } from "../DropdownMenu";
import { Icon } from "../Icon";
import { Link } from "../Link";
import { LinkProps } from "../Link/Link";
import { addStyledProps } from "../StyledProps";
import NulogyLogo from "./NulogyLogo";
import { TriggerFunctionProps } from "./TriggerFunctionProps";
Expand Down Expand Up @@ -163,7 +162,7 @@ const getSubMenuHeading = (layer, name) =>
type ThemeColorObject = {
textColor?: string;
background?: string;
logoColor?: string;
logoColor?: "white" | "blue";
};

type MenuItem = {
Expand Down Expand Up @@ -237,7 +236,7 @@ const BaseMobileMenu: React.FC<React.PropsWithChildren<BaseMobileMenuProps>> = (
}) => (
<Nav backgroundColor={themeColorObject && themeColorObject.background} {...props}>
<BrandingWrap>
<BrandingText logoColor={themeColorObject && themeColorObject.logoColor} />
<BrandingText logoColor={themeColorObject?.logoColor} />
</BrandingWrap>
<Menu>
{menuData.primaryMenu && renderTopLayerMenuItems(menuData.primaryMenu, closeMenu, themeColorObject)}
Expand Down
2 changes: 0 additions & 2 deletions src/BrandedNavBar/NavBarDropdownMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* TS IGNORED: due to problems typing propTypes and defaultProps,
it can stop being ingnored when its refactored to a functional component */
import React from "react";
import PropTypes from "prop-types";
import { Manager, Reference, Popper } from "react-popper";
Expand Down
2 changes: 1 addition & 1 deletion src/Button/ControlIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Icon } from "../Icon";

type ControlIconProps = React.ComponentPropsWithRef<"button"> &
SpaceProps & {
onClick?: (...args: any[]) => any;
onClick?: React.MouseEventHandler<HTMLButtonElement>;
icon: string;
toggled?: boolean;
disabled?: boolean;
Expand Down

0 comments on commit 46d15af

Please sign in to comment.