Skip to content

Commit 4d58d4f

Browse files
committed
fix: export IconProps as interface to allow extension by other projects
1 parent b6750f9 commit 4d58d4f

File tree

3 files changed

+1544
-2012
lines changed

3 files changed

+1544
-2012
lines changed

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no -- commitlint --edit $1

src/lib/index.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ export type IconWeight =
1111

1212
export type PaintFunction = (color: string) => React.ReactNode | null;
1313

14-
interface SVGRProps {
15-
title?: string;
16-
titleId?: string;
17-
}
18-
19-
export type IconProps = {
14+
export interface IconProps {
2015
color?: string;
2116
size?: string | number;
2217
weight?: IconWeight;
@@ -25,7 +20,9 @@ export type IconProps = {
2520
testID?: string;
2621
duotoneColor?: string;
2722
duotoneOpacity?: number;
28-
} & SVGRProps;
23+
title?: string; // SVGRProps
24+
titleId?: string; // SVGRProps
25+
};
2926

3027
export type Icon = React.FC<IconProps>;
3128

0 commit comments

Comments
 (0)