how to set circle image before click and full when open?
I'm trying just like another popular apps, the image thumbnail is circle and full when on click, how can I achieve this with react-native-lightbox?
this is my code snippet for now
<View style={{flex: 1}}>
<Lightbox>
<Image
resizeMode="contain"
style={styles.image}
source={{uri:uris}}
/>
</Lightbox>
</View>
I tried to applied borderRadius on style image, but it's not good enough.
Thanks
I'm achieving something similar by using the renderContent prop. My use case is to show a low-res image in list items and the high-res in the lightbox. The renderContent function returns the new image component and everything is working as expected.
As this issue is still open, I'd like to confirm that the implementation proposed by @sellmeadog works wonderfully.
Here's mine, based on his:
<View style={styles.imgContainer}>
<Lightbox
style={{justifyContent: "center"}}
renderContent={() => (
<Image
source={{uri: this.state.imageUri}}
style={{alignSelf: "center", width: 300, height: 300}}
/>
)}
>
<Image
source={{ uri: this.state.imageUri }}
style={styles.primaryImg}
/>
</Lightbox>
</View>