-
Notifications
You must be signed in to change notification settings - Fork 737
Width and height props added to Icon, passed only in case of svg icon #2583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
ff99976
6b7a7cc
1d5aa00
103964e
f523f67
bc337ee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,15 @@ export type IconProps = Omit<ImageProps, 'source'> & | |
* whether the icon should flip horizontally on RTL | ||
*/ | ||
supportRTL?: boolean; | ||
/** | ||
* | ||
* The icon width, width will be used only in case that the icon is svg image. | ||
*/ | ||
width?: string | number; | ||
/** | ||
* The icon height, height will be used only in case that the icon is svg image. | ||
*/ | ||
height?: string | number; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you decide to add the types (which will only work for SVG) and not set width\height from size to the SVG image? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since RN deprecated the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that if we can achieve the same result with less props it's better, especially if they are only applicable in specific situations. |
||
source?: ImageProps['source'] | ||
}; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.