Skip to content

Commit 64a229a

Browse files
committed
feat: Export both Icon and default Icon
1 parent c3c6abd commit 64a229a

21 files changed

+28
-28
lines changed

snapshots/all-in-one-js/Icon.d.ts

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

14-
declare const Icon: FunctionComponent<Props>;
14+
export declare const Icon: FunctionComponent<Props>;
1515

16-
export = Icon;
16+
export default Icon;

snapshots/all-in-one-js/Icon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { Svg, Path } from 'react-native-svg';
77
// If you don't want to make all icons in one file,
88
// try to set generate_mode to "depends-on" in root file "iconfont.json".
99
// And then regenerate icons by using cli command.
10-
const Icon = ({ color, name, size, ...rest }) => {
10+
export const Icon = ({ color, name, size, ...rest }) => {
1111
switch (name) {
1212
case 'alipay':
1313
return (

snapshots/all-in-one-ts/Icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props extends GProps, ViewProps {
1717
// If you don't want to make all icons in one file,
1818
// try to set generate_mode to "depends-on" in root file "iconfont.json".
1919
// And then regenerate icons by using cli command.
20-
const Icon: FunctionComponent<Props> = ({ color, name, size, ...rest }) => {
20+
export const Icon: FunctionComponent<Props> = ({ color, name, size, ...rest }) => {
2121
switch (name) {
2222
case 'alipay':
2323
return (

snapshots/depends-on-js/IconAlipay.d.ts

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

13-
declare const IconAlipay: FunctionComponent<Props>;
13+
export declare const IconAlipay: FunctionComponent<Props>;
1414

15-
export = IconAlipay;
15+
export default IconAlipay;

snapshots/depends-on-js/IconAlipay.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getIconColor } from './helper';
77
// If you don't like lots of icon files in your project,
88
// try to set generate_mode to "all-in-one" in root file "iconfont.json".
99
// And then regenerate icons by using cli command.
10-
const IconAlipay = ({ size, color, ...rest }) => {
10+
export const IconAlipay = ({ size, color, ...rest }) => {
1111
return (
1212
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1313
<Path

snapshots/depends-on-js/IconFont.d.ts

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

14-
declare const IconFont: FunctionComponent<Props>;
14+
export declare const IconFont: FunctionComponent<Props>;
1515

16-
export = IconFont;
16+
export default IconFont;

snapshots/depends-on-js/IconFont.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import IconSetup from './IconSetup';
99
// If you don't like lots of icon files in your project,
1010
// try to set generate_mode to "all-in-one" in root file "iconfont.json".
1111
// And then regenerate icons by using cli command.
12-
const IconFont = ({ color, name, size, ...rest }) => {
12+
export const IconFont = ({ color, name, size, ...rest }) => {
1313
switch (name) {
1414
case 'alipay':
1515
return <IconAlipay size={size} color={color} {...rest} />;

snapshots/depends-on-js/IconSetup.d.ts

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

13-
declare const IconSetup: FunctionComponent<Props>;
13+
export declare const IconSetup: FunctionComponent<Props>;
1414

15-
export = IconSetup;
15+
export default IconSetup;

snapshots/depends-on-js/IconSetup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { getIconColor } from './helper';
77
// If you don't like lots of icon files in your project,
88
// try to set generate_mode to "all-in-one" in root file "iconfont.json".
99
// And then regenerate icons by using cli command.
10-
const IconSetup = ({ size, color, ...rest }) => {
10+
export const IconSetup = ({ size, color, ...rest }) => {
1111
return (
1212
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
1313
<Path

snapshots/depends-on-js/IconUser.d.ts

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

13-
declare const IconUser: FunctionComponent<Props>;
13+
export declare const IconUser: FunctionComponent<Props>;
1414

15-
export = IconUser;
15+
export default IconUser;

0 commit comments

Comments
 (0)