Skip to content

Commit

Permalink
feat: changed proptype from string/IconSubComponentProps to `SubI…
Browse files Browse the repository at this point in the history
…con` (#2026)
  • Loading branch information
MohammedHaris96 authored Mar 19, 2024
1 parent a6af200 commit f30ab8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { FC } from "react";
import cx from "classnames";
import IconButton from "../../IconButton/IconButton";
import CloseSmall from "../../Icon/Icons/components/CloseSmall";
import Icon, { IconSubComponentProps } from "../../Icon/Icon";
import Icon from "../../Icon/Icon";
import VibeComponentProps from "../../../types/VibeComponentProps";
import { NOOP } from "../../../utils/function-utils";
import { ElementContent } from "src/types/ElementContent";
Expand All @@ -12,6 +12,7 @@ import Text from "../../Text/Text";
import Heading from "../../Heading/Heading";
import Flex from "../../Flex/Flex";
import styles from "./ModalHeader.module.scss";
import { SubIcon } from "../../../types/SubIcon";

export interface ModalHeaderProps extends VibeComponentProps {
/**
Expand All @@ -29,7 +30,8 @@ export interface ModalHeaderProps extends VibeComponentProps {
/**
* Icon to be rendered before the title
*/
icon?: string | React.FunctionComponent<IconSubComponentProps> | null;
// icon?: string | React.FunctionComponent<IconSubComponentProps> | null;
icon?: SubIcon;
/**
* Class name for the wrapper
*/
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/components/Tabs/Tab/Tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import React, { FC, forwardRef, ReactElement, useRef } from "react";
import { noop as NOOP } from "lodash-es";
import useMergeRef from "../../../hooks/useMergeRef";
import { getStyle } from "../../../helpers/typesciptCssModulesHelper";
import Icon, { IconSubComponentProps } from "../../Icon/Icon";
import Icon from "../../Icon/Icon";
import VibeComponentProps from "../../../types/VibeComponentProps";
import { IconType } from "../../Icon/IconConstants";
import { ComponentDefaultTestId, getTestId } from "../../../tests/test-ids-utils";
import styles from "./Tab.module.scss";
import { SubIcon } from "../../../types/SubIcon";

export interface TabProps extends VibeComponentProps {
/**
Expand All @@ -22,7 +23,7 @@ export interface TabProps extends VibeComponentProps {
disabled?: boolean;
active?: boolean;
focus?: boolean;
icon?: string | React.FunctionComponent<IconSubComponentProps> | null;
icon?: SubIcon;
iconType?: IconType;
iconSide?: string;
onClick?: (value: number) => void;
Expand Down

0 comments on commit f30ab8a

Please sign in to comment.