mirror of
https://github.com/zhigang1992/react-native-gifted-chat.git
synced 2026-01-12 17:42:27 +08:00
Improved typings (#916)
* Replaced LinkStyle with TextStyle as LinkStyle doesn't even exist * Properly typed renderDay and renderTime * Added optional image prop to IChatMessage
This commit is contained in:
committed by
Xavier Carpentier
parent
1fedba2203
commit
8ec3b1dbfe
9
index.d.ts
vendored
9
index.d.ts
vendored
@@ -21,6 +21,7 @@ export interface IChatMessage {
|
||||
name: string;
|
||||
avatar: string;
|
||||
};
|
||||
image?: string;
|
||||
}
|
||||
|
||||
export interface ISystemMessage {
|
||||
@@ -195,9 +196,9 @@ export interface GiftedChatProps {
|
||||
/* Custom view inside the bubble */
|
||||
renderCustomView?(): React.ReactNode;
|
||||
/*Custom day above a message*/
|
||||
renderDay?(): React.ReactNode;
|
||||
renderDay?(props: DayProps): React.ReactNode;
|
||||
/* Custom time inside a message */
|
||||
renderTime?(): React.ReactNode;
|
||||
renderTime?(props: TimeProps): React.ReactNode;
|
||||
/* Custom footer component on the ListView, e.g. 'User is typing...' */
|
||||
renderFooter?(): React.ReactNode;
|
||||
/* Custom component to render below the MessageContainer (separate from the ListView) */
|
||||
@@ -320,8 +321,8 @@ interface MessageTextProps {
|
||||
currentMessage?: IMessage;
|
||||
containerStyle?: LeftRightStyle<ViewStyle>;
|
||||
textStyle?: LeftRightStyle<TextStyle>;
|
||||
linkStyle?: LeftRightStyle<LinkStyle>;
|
||||
parsePatterns?(linkStyle: LinkStyle): any;
|
||||
linkStyle?: LeftRightStyle<TextStyle>;
|
||||
parsePatterns?(linkStyle: TextStyle): any;
|
||||
textProps?: TextProperties;
|
||||
customTextStyle?: TextStyle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user