UNPKG

@qte/react-native-gifted-chat

Version:

Performant fork of react-native-gifted-chat with FlashList support

23 lines (22 loc) 995 B
import { ViewStyle, LayoutChangeEvent } from 'react-native'; import { AvatarProps } from '../Avatar'; import { SystemMessageProps } from '../SystemMessage'; import { DayProps } from '../Day'; import { IMessage, User, LeftRightStyle } from '../types'; import Bubble from '../Bubble'; export interface MessageProps<TMessage extends IMessage> { showUserAvatar?: boolean; position: 'left' | 'right'; currentMessage: TMessage; nextMessage?: TMessage; previousMessage?: TMessage; user: User; inverted?: boolean; containerStyle?: LeftRightStyle<ViewStyle>; renderBubble?(props: Bubble['props']): React.ReactNode; renderDay?(props: DayProps): React.ReactNode; renderSystemMessage?(props: SystemMessageProps<TMessage>): React.ReactNode; renderAvatar?(props: AvatarProps<TMessage>): React.ReactNode; shouldUpdateMessage?(props: MessageProps<IMessage>, nextProps: MessageProps<IMessage>): boolean; onMessageLayout?(event: LayoutChangeEvent): void; }