Commit 16b368e6 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Add gradient to MemberView

parent 6d845eac
import React from 'react';
import { Image, Text, ViewPropTypes, StyleSheet } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';
import { connect } from 'react-redux';
import styles from './style/memberView';
import SquareView from './SquareView';
const MemberView = props => (
<SquareView style={props.style}>
<Image style={styles.image} source={{ uri: props.member.photo }} />
<Text style={styles.nameText}>{props.member.name}</Text>
<Image style={styles.image} source={{ uri: props.member.photo }}>
<LinearGradient colors={['#55000000', '#000000']} style={styles.overlayGradient} />
<Text style={styles.nameText}>{props.member.name}</Text>
</Image>
</SquareView>
);
......
......@@ -13,6 +13,14 @@ const styles = StyleSheet.create({
image: {
flex: 1,
},
overlayGradient: {
position: 'absolute',
top: '50%',
bottom: 0,
left: 0,
right: 0,
opacity: 0.6,
},
});
export default styles;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment