Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 2caac05

Browse files
committed
placeholder functionality updates to pass aslant.
1 parent 7def9cb commit 2caac05

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

lib/imageCacheHoc.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export default function imageCacheHoc(Image, options = {}) {
3737
fileHostWhitelist: PropTypes.array,
3838
source: PropTypes.object.isRequired,
3939
permanent: PropTypes.bool,
40-
style: View.propTypes.style
40+
style: View.propTypes.style,
41+
placeholder: PropTypes.shape({
42+
component: PropTypes.func,
43+
props: PropTypes.object
44+
})
4145
};
4246

4347
constructor(props) {

tests/CacheableImage.test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ describe('CacheableImage', function() {
8282
'fileHostWhitelist',
8383
'source',
8484
'permanent',
85-
'style'
85+
'style',
86+
'placeholder'
8687
]);
8788

8889
});

tests/imageCacheHoc.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('CacheableImage', function() {
7878
width:150,
7979
height: 204
8080
},
81-
placeholderImage: {
81+
placeholderImage: { // eslint-disable-line react-native/no-color-literals
8282
width:150,
8383
height: 204,
8484
backgroundColor: '#00ffff'
@@ -125,7 +125,7 @@ describe('CacheableImage', function() {
125125
width:150,
126126
height: 204
127127
},
128-
optionPlaceholder: {
128+
optionPlaceholder: { // eslint-disable-line react-native/no-color-literals
129129
width:150,
130130
height: 204,
131131
backgroundColor: '#dc143c'

0 commit comments

Comments
 (0)