iOS: Fix room item icon alignment

This commit is contained in:
Rodrigo Nascimento 2017-08-13 20:19:27 -03:00
parent 0ccfbbb574
commit b9f802cfac
1 changed files with 3 additions and 9 deletions

View File

@ -42,14 +42,8 @@ const styles = StyleSheet.create({
alignItems: 'center' alignItems: 'center'
}, },
icon: { icon: {
height: 40,
width: 40,
borderRadius: 20,
lineHeight: 30,
fontSize: 20, fontSize: 20,
color: '#fff', color: '#fff'
overflow: 'hidden',
textAlign: 'center'
}, },
avatar: { avatar: {
width: 40, width: 40,
@ -95,8 +89,8 @@ export default class RoomItem extends React.PureComponent {
const { color } = avatarInitialsAndColor(name); const { color } = avatarInitialsAndColor(name);
return ( return (
<View style={styles.iconContainer}> <View style={[styles.iconContainer, { backgroundColor: color }]}>
<MaterialCommunityIcons name={icon} style={[styles.icon, { backgroundColor: color }]} /> <MaterialCommunityIcons name={icon} style={styles.icon} />
</View> </View>
); );
} }