Skip to content

Commit

Permalink
Fix #6564: IconOptions typescript updated for FontAwesome (#6579)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 9, 2024
1 parent 20e007f commit 9639881
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/lib/utils/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,20 +177,23 @@ export declare namespace ZIndexUtils {

/**
* Icon options passed to any icon.
* ComponentProps are props from the owning component.
* AdditionalProps are any custom properties of an icon like SortIcon of the Datatable for example.
* @template ComponentProps Props from the owning component.
* @template AdditionalProps Any custom properties of an icon like SortIcon of the Datatable for example.
*/
export type IconOptions<ComponentProps, AdditionalProps> = AdditionalProps & {
/**
* Icon specific properties.
* Icon specific properties. Size property allows FontAwesome to work properly.
* @type {(React.HTMLProps<unknown> & { size?: string }) | (React.SVGProps<unknown> & { size?: string })}
*/
iconProps: React.HTMLProps<any> | React.SVGProps<any>;
iconProps: (React.HTMLProps<unknown> & { size?: string }) | (React.SVGProps<unknown> & { size?: string });
/**
* The element representing the icon.
* @type {React.ReactNode}
*/
element: React.ReactNode;
/**
* Properties of the owning component.
* @type {ComponentProps}
*/
props?: ComponentProps;
[key: string]: any;
Expand Down

0 comments on commit 9639881

Please sign in to comment.