invertase / react-native-material-design

React Native UI Components for Material Design
http://react-native-material-design.github.io
MIT License
3.15k stars 365 forks source link

Avatar showing up as square with border radius #52

Closed Proyoyo closed 8 years ago

Proyoyo commented 8 years ago

Since commit 71af73d, the in my project is showing up as square with border radius instead of circle. Is this behaviour intended?

Here is how I used the code: avatar = <Avatar image = {<Image source = {require('../../everperform-common/assets/default-background.jpg')} />} style = {styles.avatarHeader} size = {110}/>

avatarHeader: { flex: 1 }

Ehesp commented 8 years ago

It was actually via this commit I'd imagine: https://github.com/react-native-material-design/react-native-material-design/commit/23980c2ac9ec8029bea36f38893ad5203597e9ca

Looks like there needs be more checks on the borderRadius.

avatar = <Avatar image = {<Image source = {require('../../everperform-common/assets/default-background.jpg')} />} style={styles.avatarHeader} size={110} borderRadius={55} />

This should sort you out.