qwertyball
qwertyball

Reputation: 135

How to set a borderColor to react native elements Avatar?

Starting to go crazy, can´t find a way of making a border and borderColor on my Avatar from react native elements. What im i doing wrong ? This must have an easy solution ?

enter image description here

<Avatar
      medium
      rounded
      source={{ uri: this.props.profile[0].profile_picture }}
      onPress={this.toggleModal.bind(this)}
      iconStyle={{ borderColor: 'white', borderTopLeftRadius: 1,borderStyle:'solid' }}
      containerStyle={{ borderColor:'white', borderTopLeftRadius: 1, borderStyle:'solid'  }}
      avatarStyle={{borderColor: 'white', borderTopLeftRadius: 1,borderStyle:'solid' }}
/>

Upvotes: 3

Views: 11491

Answers (1)

Colin Ricardo
Colin Ricardo

Reputation: 17249

You need to add a borderWidth. E.g.

avatarStyle={{ borderWidth: 2, borderColor: 'white', borderTopLeftRadius: 1, borderStyle:'solid' }}

Upvotes: 14

Related Questions