Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatar isn't displayed when custom content is used #155

Open
ClydeDz opened this issue Jun 29, 2024 · 0 comments
Open

Avatar isn't displayed when custom content is used #155

ClydeDz opened this issue Jun 29, 2024 · 0 comments

Comments

@ClydeDz
Copy link

ClydeDz commented Jun 29, 2024

Hi,

I've been using this library for my chat app, and it's been so easy to get something done really quickly.

I'm stuck with this problem - when displaying custom content like the code snippet below, I cannot get the Avatar to display beside it. I've tried several combinations with no luck. Any idea how to fix this?

This is the code snippet:

 <Message
    key={index}
    model={{
      type: "custom",
      sentTime: message.timestamp,
      sender: message.from,
      direction:  "incoming"
    }}
    children={<Avatar src="image-location.jpg" name="profile name" />}
    avatarSpacer={true}
  >
    <Message.CustomContent>
      <div>
        <Button border>Some action goes here</Button> 
      </div>
    </Message.CustomContent>
  </Message>

This is the output:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant