Skip to content

Commit e8149f9

Browse files
add local image example
1 parent fdc1148 commit e8149f9

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/rn-tester/js/examples/BackgroundImage/BackgroundImageExample.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,26 @@ exports.examples = [
477477
);
478478
},
479479
},
480+
{
481+
title: 'URL Image from local file',
482+
name: 'local-image',
483+
render(): React.Node {
484+
return (
485+
<BackgroundImageBox
486+
style={{
487+
width: 200,
488+
height: 200,
489+
experimental_backgroundImage: [
490+
{
491+
type: 'url',
492+
uri: require('../../assets/bunny.png'),
493+
},
494+
],
495+
experimental_backgroundRepeat: 'no-repeat',
496+
}}
497+
testID="background-image-local"
498+
/>
499+
);
500+
},
501+
},
480502
] as Array<RNTesterModuleExample>;

0 commit comments

Comments
 (0)