From d967a55074bf80550274e0dcc5f9df6985c85917 Mon Sep 17 00:00:00 2001 From: Scott Becker Date: Wed, 21 Oct 2020 10:06:32 -0700 Subject: [PATCH 1/2] Export IconProps typedef so projects can re-use - exporting IconProps so it can be available to TypeScript components using react-feather - as is it needs to duplicated, which is fragile because react-feather could change - renamed "Props" to "IconProps" --- src/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.d.ts b/src/index.d.ts index ae32e9e6..28cf40dd 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,12 +1,12 @@ /// import { FC, SVGAttributes } from 'react'; -interface Props extends SVGAttributes { +export interface IconProps extends SVGAttributes { color?: string; size?: string | number; } -type Icon = FC; +type Icon = FC; export const Activity: Icon; export const Airplay: Icon; export const AlertCircle: Icon; From 16c5bae57d3e30f42c8dcc0d688a0099921a76ce Mon Sep 17 00:00:00 2001 From: Scott Becker Date: Wed, 21 Oct 2020 10:10:06 -0700 Subject: [PATCH 2/2] Export Icon as well --- src/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.d.ts b/src/index.d.ts index 28cf40dd..94e32077 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -6,7 +6,7 @@ export interface IconProps extends SVGAttributes { size?: string | number; } -type Icon = FC; +export type Icon = FC; export const Activity: Icon; export const Airplay: Icon; export const AlertCircle: Icon;