Skip to content

Commit ea40e9e

Browse files
committed
fix: export explicit icon name to make ide happy
1 parent f70242a commit ea40e9e

22 files changed

+88
-44
lines changed

snapshots/demo-js/IconAlipay.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import { Svg, Path } from 'react-native-svg';
55
import { getIconColor } from './helper';
66

7-
const IconAlipay = ({ size, color, ...rest }) => {
7+
let IconAlipay = ({ size, color, ...rest }) => {
88
return (
99
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1010
<Path
@@ -23,4 +23,6 @@ IconAlipay.defaultProps = {
2323
size: 18,
2424
};
2525

26-
export default React.memo ? React.memo(IconAlipay) : IconAlipay;
26+
IconAlipay = React.memo ? React.memo(IconAlipay) : IconAlipay;
27+
28+
export default IconAlipay;

snapshots/demo-js/IconClassSvg.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const xml = `
2525
</svg>
2626
`
2727

28-
const IconClassSvg = ({ size, color, ...rest }) => {
28+
let IconClassSvg = ({ size, color, ...rest }) => {
2929
return (
3030
<SvgCss xml={xml} width={size} height={size} {...rest} />
3131
);
@@ -35,4 +35,6 @@ IconClassSvg.defaultProps = {
3535
size: 18,
3636
};
3737

38-
export default React.memo ? React.memo(IconClassSvg) : IconClassSvg;
38+
IconClassSvg = React.memo ? React.memo(IconClassSvg) : IconClassSvg;
39+
40+
export default IconClassSvg;

snapshots/demo-js/IconInlineStyle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const xml = `
1919
</svg>
2020
`
2121

22-
const IconInlineStyle = ({ size, color, ...rest }) => {
22+
let IconInlineStyle = ({ size, color, ...rest }) => {
2323
return (
2424
<SvgCss xml={xml} width={size} height={size} {...rest} />
2525
);
@@ -29,4 +29,6 @@ IconInlineStyle.defaultProps = {
2929
size: 18,
3030
};
3131

32-
export default React.memo ? React.memo(IconInlineStyle) : IconInlineStyle;
32+
IconInlineStyle = React.memo ? React.memo(IconInlineStyle) : IconInlineStyle;
33+
34+
export default IconInlineStyle;

snapshots/demo-js/IconNormal.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const xml = `
99
</svg>
1010
`
1111

12-
const IconNormal = ({ size, color, ...rest }) => {
12+
let IconNormal = ({ size, color, ...rest }) => {
1313
return (
1414
<SvgXml xml={xml} width={size} height={size} {...rest} />
1515
);
@@ -19,4 +19,6 @@ IconNormal.defaultProps = {
1919
size: 18,
2020
};
2121

22-
export default React.memo ? React.memo(IconNormal) : IconNormal;
22+
IconNormal = React.memo ? React.memo(IconNormal) : IconNormal;
23+
24+
export default IconNormal;

snapshots/demo-js/IconSetup.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import { Svg, Path } from 'react-native-svg';
55
import { getIconColor } from './helper';
66

7-
const IconSetup = ({ size, color, ...rest }) => {
7+
let IconSetup = ({ size, color, ...rest }) => {
88
return (
99
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1010
<Path
@@ -59,4 +59,6 @@ IconSetup.defaultProps = {
5959
size: 18,
6060
};
6161

62-
export default React.memo ? React.memo(IconSetup) : IconSetup;
62+
IconSetup = React.memo ? React.memo(IconSetup) : IconSetup;
63+
64+
export default IconSetup;

snapshots/demo-js/IconStyle.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const xml = `
99
</svg>
1010
`
1111

12-
const IconStyle = ({ size, color, ...rest }) => {
12+
let IconStyle = ({ size, color, ...rest }) => {
1313
return (
1414
<SvgXml xml={xml} width={size} height={size} {...rest} />
1515
);
@@ -19,4 +19,6 @@ IconStyle.defaultProps = {
1919
size: 18,
2020
};
2121

22-
export default React.memo ? React.memo(IconStyle) : IconStyle;
22+
IconStyle = React.memo ? React.memo(IconStyle) : IconStyle;
23+
24+
export default IconStyle;

snapshots/demo-js/IconUser.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React from 'react';
44
import { Svg, Path } from 'react-native-svg';
55
import { getIconColor } from './helper';
66

7-
const IconUser = ({ size, color, ...rest }) => {
7+
let IconUser = ({ size, color, ...rest }) => {
88
return (
99
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1010
<Path
@@ -23,4 +23,6 @@ IconUser.defaultProps = {
2323
size: 18,
2424
};
2525

26-
export default React.memo ? React.memo(IconUser) : IconUser;
26+
IconUser = React.memo ? React.memo(IconUser) : IconUser;
27+
28+
export default IconUser;

snapshots/demo-js/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import IconInlineStyle from './IconInlineStyle';
1010
import IconNormal from './IconNormal';
1111
import IconStyle from './IconStyle';
1212

13-
const IconFont = ({ name, ...rest }) => {
13+
let IconFont = ({ name, ...rest }) => {
1414
switch (name) {
1515
case 'alipay':
1616
return <IconAlipay key="1" {...rest} />;
@@ -31,4 +31,6 @@ const IconFont = ({ name, ...rest }) => {
3131
return null;
3232
};
3333

34-
export default React.memo ? React.memo(IconFont) : IconFont;
34+
IconFont = React.memo ? React.memo(IconFont) : IconFont;
35+
36+
export default IconFont;

snapshots/demo-ts/IconAlipay.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface Props extends GProps, ViewProps {
1111
color?: string | string[];
1212
}
1313

14-
const IconAlipay: FunctionComponent<Props> = ({ size, color, ...rest }) => {
14+
let IconAlipay: FunctionComponent<Props> = ({ size, color, ...rest }) => {
1515
return (
1616
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1717
<Path
@@ -30,4 +30,6 @@ IconAlipay.defaultProps = {
3030
size: 20,
3131
};
3232

33-
export default React.memo ? React.memo(IconAlipay) : IconAlipay;
33+
IconAlipay = React.memo ? React.memo(IconAlipay) : IconAlipay;
34+
35+
export default IconAlipay;

snapshots/demo-ts/IconClassSvg.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const xml = `
3232
</svg>
3333
`
3434

35-
const IconClassSvg: FunctionComponent<Props> = ({ size, color, ...rest }) => {
35+
let IconClassSvg: FunctionComponent<Props> = ({ size, color, ...rest }) => {
3636
return (
3737
<SvgCss xml={xml} width={size} height={size} {...rest} />
3838
);
@@ -42,4 +42,6 @@ IconClassSvg.defaultProps = {
4242
size: 20,
4343
};
4444

45-
export default React.memo ? React.memo(IconClassSvg) : IconClassSvg;
45+
IconClassSvg = React.memo ? React.memo(IconClassSvg) : IconClassSvg;
46+
47+
export default IconClassSvg;

0 commit comments

Comments
 (0)