Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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