File tree Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Expand file tree Collapse file tree 1 file changed +6
-15
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ import Image, {ImageProps} from '../image';
4
4
import * as CardPresenter from './CardPresenter' ;
5
5
import asCardChild , { asCardChildProps } from './asCardChild' ;
6
6
7
-
8
7
export type CardImageProps = ImageProps & {
9
8
/**
10
9
* Image width
@@ -41,32 +40,24 @@ class CardImage extends PureComponent<Props> {
41
40
42
41
render ( ) {
43
42
const {
44
- source,
45
43
style,
46
- testID,
47
- overlayType,
48
44
context : { borderStyle} ,
45
+ /* Note: Destruct position to avoid passing it to Image component cause it crashes Android (position is a saved prop) */
46
+ // eslint-disable-next-line
47
+ position,
49
48
...others
50
49
} = this . props ;
51
50
52
51
return (
53
52
< View style = { [ this . styles . container , borderStyle , style ] } >
54
- < Image
55
- testID = { testID }
56
- source = { source }
57
- style = { [ this . styles . image ] }
58
- overlayType = { overlayType }
59
- { ...others }
60
- />
53
+ < Image style = { [ this . styles . image ] } { ...others } />
61
54
</ View >
62
- ) ;
55
+ ) ;
63
56
}
64
57
}
65
58
66
59
function createStyles ( { width, height, context : { position} } : Props ) {
67
- const { top, left, right, bottom} = CardPresenter . extractPositionValues (
68
- position
69
- ) ;
60
+ const { top, left, right, bottom} = CardPresenter . extractPositionValues ( position ) ;
70
61
return StyleSheet . create ( {
71
62
container : {
72
63
height : left || right ? undefined : height ,
You can’t perform that action at this time.
0 commit comments