@lg-chat/message-feed
TypeScript icon, indicating that this package has built-in type declarations

3.0.1 • Public • Published

Message Feed

Installation

Yarn

yarn add @lg-chat/message-feed

NPM

npm install @lg-chat/message-feed

Example

import { MessageFeed } from '@lg-chat/message-feed';

return (
  <MessageFeed darkMode={darkMode} {...rest}>
    {messages.map(
      ({ id, isMongo, messageBody, userName, messageRatingProps }) => (
        <Message
          key={id}
          sourceType="markdown"
          darkMode={darkMode}
          avatar={
            <Avatar
              variant={isMongo ? 'mongo' : 'user'}
              darkMode={darkMode}
              name={userName}
            />
          }
          isSender={!!userName}
          messageRatingProps={messageRatingProps}
        >
          {messageBody}
        </Message>
      ),
    )}
  </MessageFeed>
);

Properties

Prop Type Description Default
darkMode boolean Determines if the component should render in dark mode false
... HTMLElementProps<'div'> Props spread on root element

Readme

Keywords

none

Package Sidebar

Install

npm i @lg-chat/message-feed

Weekly Downloads

43

Version

3.0.1

License

Apache-2.0

Unpacked Size

66.6 kB

Total Files

31

Last publish

Collaborators

  • brookescarlett