playground icon indicating copy to clipboard operation
playground copied to clipboard

Bug: Avatar Component is not rendering

Open pranshuchittora opened this issue 4 years ago • 5 comments

Avatar Component is not rendering -> https://react-native-elements.js.org/#/avatar

Screenshot from 2021-03-10 17-29-28

Possible Cause Updated Props in the Library

pranshuchittora avatar Mar 10 '21 12:03 pranshuchittora

Hey @pranshuchittora, can you please assign this to me? Also, I noticed that the Avatar Component is rendering correctly but seems like a default backgroundColor is not set/being overridden.

sachdeva-shrey avatar Mar 10 '21 12:03 sachdeva-shrey

Assigning it to you @sachdeva-shrey Thanks for the heads-up, if possible can you raise a PR for the same?

pranshuchittora avatar Mar 10 '21 12:03 pranshuchittora

Sure thing, thanks! @pranshuchittora

sachdeva-shrey avatar Mar 10 '21 12:03 sachdeva-shrey

@pranshuchittora This issue seems to be originating from the library itself. I believe the Avatar component is supposed to have a default backgroundColor even without a given source, but it is set to transparent currently. Thus the title in white isn't visible clearly. Please let me know if I'm wrong.

sachdeva-shrey avatar Mar 10 '21 15:03 sachdeva-shrey

Try this as the default containerStyle {background:'#0ff'} (This is just an example, pls use some subtle colour)

With this, can also update the props in the playgroundAvatar. I can see some deprecated props like showaccessory https://reactnativeelements.com/docs/2.3.2/avatar#showaccessory

pranshuchittora avatar Mar 10 '21 16:03 pranshuchittora