Skip to content

Bug: Avatar Component is not rendering  #19

Open

Description

@pranshuchittora

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

Activity

  1. sachdeva-shrey commented on Mar 10, 2021

    @sachdeva-shrey
    Contributor

    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.

  2. pranshuchittora commented on Mar 10, 2021

    @pranshuchittora
    MemberAuthor

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

  3. sachdeva-shrey commented on Mar 10, 2021

    @sachdeva-shrey
    Contributor

    Sure thing, thanks! @pranshuchittora

  4. sachdeva-shrey commented on Mar 10, 2021

    @sachdeva-shrey
    Contributor

    @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.

  5. pranshuchittora commented on Mar 10, 2021

    @pranshuchittora
    MemberAuthor

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions