Skip to content

Commit 4a5f367

Browse files
committed
feat: Export both named icon and default icon
1 parent 264d2ca commit 4a5f367

24 files changed

+32
-32
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ interface Props extends DOMAttributes<SVGElement> {
1010
className?: string;
1111
}
1212

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

15-
export = Icon;
15+
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 @@ const DEFAULT_STYLE = {
77
display: 'block',
88
};
99

10-
const Icon = ({ color, name, size, style: _style, ...rest }) => {
10+
export const Icon = ({ color, name, size, style: _style, ...rest }) => {
1111
const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE;
1212

1313
switch (name) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const DEFAULT_STYLE: CSSProperties = {
1818
display: 'block',
1919
};
2020

21-
const Icon: FunctionComponent<Props> = ({ color, name, size, style: _style, ...rest }) => {
21+
export const Icon: FunctionComponent<Props> = ({ color, name, size, style: _style, ...rest }) => {
2222
const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE;
2323

2424
switch (name) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ interface Props extends DOMAttributes<SVGElement> {
99
className?: string;
1010
}
1111

12-
declare const IconAlipay: FunctionComponent<Props>;
12+
export declare const IconAlipay: FunctionComponent<Props>;
1313

14-
export = IconAlipay;
14+
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 @@ const DEFAULT_STYLE = {
77
display: 'block',
88
};
99

10-
const IconAlipay = ({ size, color, style: _style, ...rest }) => {
10+
export const IconAlipay = ({ size, color, style: _style, ...rest }) => {
1111
const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE;
1212

1313
return (

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ interface Props extends DOMAttributes<SVGElement> {
1010
className?: string;
1111
}
1212

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

15-
export = IconFont;
15+
export default IconFont;

snapshots/depends-on-js/IconFont.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import IconAlipay from './IconAlipay';
55
import IconUser from './IconUser';
66
import IconSetup from './IconSetup';
77

8-
const IconFont = ({ color, name, size, ...rest }) => {
8+
export const IconFont = ({ color, name, size, ...rest }) => {
99
switch (name) {
1010
case 'alipay':
1111
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
@@ -9,6 +9,6 @@ interface Props extends DOMAttributes<SVGElement> {
99
className?: string;
1010
}
1111

12-
declare const IconSetup: FunctionComponent<Props>;
12+
export declare const IconSetup: FunctionComponent<Props>;
1313

14-
export = IconSetup;
14+
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 @@ const DEFAULT_STYLE = {
77
display: 'block',
88
};
99

10-
const IconSetup = ({ size, color, style: _style, ...rest }) => {
10+
export const IconSetup = ({ size, color, style: _style, ...rest }) => {
1111
const style = _style ? { ...DEFAULT_STYLE, ..._style } : DEFAULT_STYLE;
1212

1313
return (

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ interface Props extends DOMAttributes<SVGElement> {
99
className?: string;
1010
}
1111

12-
declare const IconUser: FunctionComponent<Props>;
12+
export declare const IconUser: FunctionComponent<Props>;
1313

14-
export = IconUser;
14+
export default IconUser;

0 commit comments

Comments
 (0)