Skip to content

Commit

Permalink
Remove Icon type restriction from Button adornments (#1872)
Browse files Browse the repository at this point in the history
refactor: loosen type rules around Button adornments
  • Loading branch information
jordankoschei-okta authored Jul 13, 2023
1 parent e53a30c commit 3d51d4a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/odyssey-react-mui/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { Button as MuiButton } from "@mui/material";
import type { ButtonProps as MuiButtonProps } from "@mui/material";
import { memo, ReactElement, useCallback, useContext } from "react";

import { Icon } from "./Icon";
import { MuiPropsContext } from "./MuiPropsContext";
import { Tooltip } from "./Tooltip";

Expand All @@ -28,13 +27,13 @@ export const buttonVariantValues = [
] as const;

export type ButtonProps = {
endIcon?: ReactElement<typeof Icon>;
endIcon?: ReactElement;
id?: string;
isDisabled?: boolean;
isFullWidth?: boolean;
onClick?: MuiButtonProps["onClick"];
size?: (typeof buttonSizeValues)[number];
startIcon?: ReactElement<typeof Icon>;
startIcon?: ReactElement;
text?: string;
/**
* `tooltipText` determines the text of the tooltip that wraps the button if it's icon-only.
Expand Down

0 comments on commit 3d51d4a

Please sign in to comment.