Skip to content

Commit 1cffa66

Browse files
authored
Width and height props added to Icon, passed only in case of svg icon (#2583)
* Width and height props added to Icon, passed only in case of svg icon * fixed review notes * passing iconSiez to svg image > The code looks good, you can merge if you've tested it (on both platforms)
1 parent 531cebd commit 1cffa66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/icon/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export type IconProps = Omit<ImageProps, 'source'> &
2727
* whether the icon should flip horizontally on RTL
2828
*/
2929
supportRTL?: boolean;
30-
source?: ImageProps['source']
30+
source?: ImageProps['source'];
3131
};
3232

3333
/**
@@ -72,7 +72,7 @@ const Icon = forwardRef((props: Props, ref: any) => {
7272
/>
7373
);
7474

75-
const renderSvg = () => <SvgImage data={source} {...props}/>;
75+
const renderSvg = () => <SvgImage data={source} {...props} {...iconSize}/>;
7676

7777
if (typeof source === 'string' && isBase64ImageContent(source) && Constants.isWeb) {
7878
return renderImage();

0 commit comments

Comments
 (0)