Skip to content

Commit

Permalink
[core] fix(IconProps): widen type of HTML attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed Jul 17, 2023
1 parent 214cc02 commit eb4eff6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/components/icon/icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { Classes, DISPLAYNAME_PREFIX, IntentProps, MaybeElement, Props, removeNo
// re-export for convenience, since some users won't be importing from or have a direct dependency on the icons package
export { IconName, IconSize };

export type IconHTMLAttributes = Omit<React.HTMLAttributes<HTMLElement | SVGSVGElement>, "children" | "title">;
export type IconHTMLAttributes = Omit<React.HTMLAttributes<HTMLOrSVGElement>, "children" | "title">;

export interface IconProps extends IntentProps, Props, SVGIconProps, IconHTMLAttributes {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/icons/src/svgIconProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as React from "react";
*/
export interface SVGIconProps
extends React.RefAttributes<any>,
Omit<React.DOMAttributes<HTMLElement | SVGSVGElement>, "children" | "dangerouslySetInnerHTML"> {
Omit<React.DOMAttributes<HTMLOrSVGElement>, "children" | "dangerouslySetInnerHTML"> {
/** A space-delimited list of class names to pass along to the SVG element. */
className?: string;

Expand Down

1 comment on commit eb4eff6

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[core] fix(IconProps): widen type of HTML attributes

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.