File tree 5 files changed +23
-3
lines changed
5 files changed +23
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ module.exports = {
31
31
'!components/*/style/index.tsx' ,
32
32
'!components/style/index.tsx' ,
33
33
'!components/*/locale/index.tsx' ,
34
- '!components/form /__tests__/type.test.tsx' ,
34
+ '!components/* /__tests__/type.test.tsx' ,
35
35
'!components/**/*/interface.{ts,tsx}' ,
36
36
] ,
37
37
transformIgnorePatterns,
Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
2
+ import React from 'react' ;
3
+ import Icon from '..' ;
4
+ import { ReactComponent as logo } from './logo.svg' ;
5
+
6
+ describe ( 'Icon TypeScript test' , ( ) => {
7
+ it ( 'empty test case placeholder to avoid jest error' , ( ) => {
8
+ // empty
9
+ } ) ;
10
+ } ) ;
11
+
12
+ < Icon component = { logo } /> ;
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export interface IconProps {
67
67
title ?: string ;
68
68
onKeyUp ?: React . KeyboardEventHandler < HTMLElement > ;
69
69
onClick ?: React . MouseEventHandler < HTMLElement > ;
70
- component ?: React . ComponentType < CustomIconComponentProps > ;
70
+ component ?: React . ComponentType < CustomIconComponentProps | React . SVGProps < SVGSVGElement > > ;
71
71
twoToneColor ?: string ;
72
72
viewBox ?: string ;
73
73
spin ?: boolean ;
Original file line number Diff line number Diff line change 1
- declare module '*.svg' ;
1
+ // https://github.com/facebook/create-react-app/blob/f09d3d3a52c1b938cecc977c2bbc0942ea0a7e70/packages/react-scripts/lib/react-app.d.ts#L42-L49
2
+ declare module '*.svg' {
3
+ import * as React from 'react' ;
4
+
5
+ export const ReactComponent : React . FunctionComponent < React . SVGProps < SVGSVGElement > > ;
6
+
7
+ const src : string ;
8
+ export default src ;
9
+ }
2
10
3
11
declare module 'rc-calendar*' ;
4
12
You can’t perform that action at this time.
0 commit comments