Skip to content

Commit

Permalink
Merge pull request #762 from Vl3oss/master
Browse files Browse the repository at this point in the history
fix: add function type in `icon` prop #761
  • Loading branch information
fkhadra committed May 29, 2022
2 parents 175ef40 + 0a488cd commit 7a1a791
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { IconProps } from '../components/Icons';

type Nullable<T> = {
[P in keyof T]: T[P] | null;
Expand Down Expand Up @@ -169,7 +170,7 @@ interface CommonOptions {
* Used to display a custom icon. Set it to `false` to prevent
* the icons from being displayed
*/
icon?: React.ReactNode | false;
icon?: React.ReactNode | false | ((iconProps: IconProps) => React.ReactNode);

/**
* Theme to use.
Expand Down

0 comments on commit 7a1a791

Please sign in to comment.