Skip to content

Instantly share code, notes, and snippets.

@jankcat
Created December 26, 2016 17:26
Show Gist options
  • Save jankcat/451e4756ce25ecf046b0bbfb3b488127 to your computer and use it in GitHub Desktop.
Save jankcat/451e4756ce25ecf046b0bbfb3b488127 to your computer and use it in GitHub Desktop.
React Native Stacked Round Images
/**
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View,
Image
} from 'react-native';
export default class testProject extends Component {
render() {
return (
<View style={styles.container}>
<Image style={styles.firstImage} source={{uri: 'https://ih1.redbubble.net/image.24694638.0052/flat,100x100,070,f.u1.jpg'}} />
<Image style={styles.secondImage} source={{uri: 'https://ih1.redbubble.net/image.24694638.0052/flat,100x100,070,f.u1.jpg'}} />
<Image style={styles.thirdImage} source={{uri: 'https://ih1.redbubble.net/image.24694638.0052/flat,100x100,070,f.u1.jpg'}} />
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#2E2E2E',
},
firstImage: {
width: 60,
height: 60,
borderRadius: 30,
},
secondImage: {
width: 60,
height: 60,
left: -20,
borderRadius: 30,
},
thirdImage: {
width: 60,
height: 60,
left: -40,
borderRadius: 30,
},
});
AppRegistry.registerComponent('testProject', () => testProject);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment