File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
button/__tests__/__snapshots__ Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -916,6 +916,7 @@ exports[`Button container size should have no padding of button is an icon butto
916
916
undefined ,
917
917
undefined ,
918
918
undefined ,
919
+ false ,
919
920
Array [
920
921
Object {
921
922
" marginRight" : 8 ,
@@ -1841,6 +1842,7 @@ exports[`Button icon should apply color on icon 1`] = `
1841
1842
undefined ,
1842
1843
undefined ,
1843
1844
undefined ,
1845
+ false ,
1844
1846
Array [
1845
1847
Object {
1846
1848
" tintColor" : " green" ,
@@ -1897,6 +1899,7 @@ exports[`Button icon should apply color on icon 2`] = `
1897
1899
undefined ,
1898
1900
undefined ,
1899
1901
undefined ,
1902
+ false ,
1900
1903
Array [
1901
1904
Object {
1902
1905
" tintColor" : " #FC3D2F" ,
@@ -1953,6 +1956,7 @@ exports[`Button icon should include custom iconStyle provided as a prop 1`] = `
1953
1956
undefined ,
1954
1957
undefined ,
1955
1958
undefined ,
1959
+ false ,
1956
1960
Array [
1957
1961
Object {
1958
1962
" tintColor" : " #FFFFFF" ,
@@ -2014,6 +2018,7 @@ exports[`Button icon should return icon style according to different variations
2014
2018
undefined ,
2015
2019
undefined ,
2016
2020
undefined ,
2021
+ false ,
2017
2022
Array [
2018
2023
Object {
2019
2024
" tintColor" : " #5A48F5" ,
@@ -2070,6 +2075,7 @@ exports[`Button icon should return icon style according to different variations
2070
2075
undefined ,
2071
2076
undefined ,
2072
2077
undefined ,
2078
+ false ,
2073
2079
Array [
2074
2080
Object {
2075
2081
" tintColor" : " #5A48F5" ,
@@ -2131,6 +2137,7 @@ exports[`Button icon should return icon style according to different variations
2131
2137
undefined ,
2132
2138
undefined ,
2133
2139
undefined ,
2140
+ false ,
2134
2141
Array [
2135
2142
Object {
2136
2143
" tintColor" : " #FFFFFF" ,
@@ -3145,6 +3152,7 @@ exports[`Button labelColor should return undefined color if this is an icon butt
3145
3152
undefined ,
3146
3153
undefined ,
3147
3154
undefined ,
3155
+ false ,
3148
3156
Array [
3149
3157
Object {
3150
3158
" tintColor" : " #FFFFFF" ,
Original file line number Diff line number Diff line change @@ -206,7 +206,6 @@ class Image extends PureComponent<Props, State> {
206
206
const shouldFlipRTL = supportRTL && Constants . isRTL ;
207
207
const ImageView = this . shouldUseImageBackground ( ) ? ImageBackground : RNImage ;
208
208
const { margins} = modifiers ;
209
- const resizeMode = useImageInsideContainer ? 'contain' : undefined ;
210
209
211
210
return (
212
211
// @ts -ignore
@@ -218,10 +217,10 @@ class Image extends PureComponent<Props, State> {
218
217
this . isGif ( ) && styles . gifImage ,
219
218
aspectRatio && { aspectRatio} ,
220
219
! useImageInsideContainer && margins ,
220
+ useImageInsideContainer && styles . containImage ,
221
221
style ,
222
222
useImageInsideContainer && styles . shrink
223
223
] }
224
- resizeMode = { resizeMode }
225
224
accessible = { false }
226
225
accessibilityRole = { 'image' }
227
226
{ ...others }
@@ -276,6 +275,9 @@ const styles = StyleSheet.create({
276
275
} ,
277
276
shrink : {
278
277
flexShrink : 1
278
+ } ,
279
+ containImage : {
280
+ resizeMode : 'contain'
279
281
}
280
282
} ) ;
281
283
You can’t perform that action at this time.
0 commit comments