Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/MessageList/__tests__/MessageList.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import { Chat } from '../../Chat';
import { MessageList } from '../MessageList';
import { Channel } from '../../Channel';
import {
ComponentProvider,
useChannelActionContext,
useMessageContext,
WithComponents,
} from '../../../context';
import { EmptyStateIndicator as EmptyStateIndicatorMock } from '../../EmptyStateIndicator';
import { ScrollToBottomButton } from '../ScrollToBottomButton';
Expand Down Expand Up @@ -55,9 +55,9 @@ const renderComponent = ({ channelProps, chatClient, components = {}, msgListPro
render(
<Chat client={chatClient}>
<Channel {...channelProps}>
<ComponentProvider value={components}>
<WithComponents overrides={components}>
<MessageList {...msgListProps} />
</ComponentProvider>
</WithComponents>
</Channel>
</Chat>,
);
Expand Down
4 changes: 2 additions & 2 deletions src/context/ComponentContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ export type ComponentContextValue = {
/** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */
VirtualMessage?: React.ComponentType<FixedHeightMessageProps>;
/** Custom UI component to wrap MessageList children. Default is the `ul` tag */
MessageListWrapper?: React.ComponentType;
MessageListWrapper?: React.ComponentType<PropsWithChildren>;
/** Custom UI component to wrap each element of MessageList. Default is the `li` tag */
MessageListItem?: React.ComponentType;
MessageListItem?: React.ComponentType<PropsWithChildren>;
};

export const ComponentContext = React.createContext<ComponentContextValue>({});
Expand Down