@cometchat/chat-uikit-react-native
Version:
Ready-to-use Chat UI Components for React Native
36 lines (35 loc) • 1.09 kB
TypeScript
import React from "react";
import { SuggestionItem } from "./SuggestionItem";
import { SuggestionListStyle } from "../../../theme/type";
/**
* Props for the CometChatSuggestionList component.
*/
export interface CometChatSuggestionListInterface {
/**
* Color for the separator between suggestion items.
*/
separatorColor?: string;
/**
* Array of suggestion items to be displayed.
*/
data: Array<SuggestionItem>;
/**
* Custom styles for the suggestion list.
*/
listStyle: SuggestionListStyle;
/**
* Callback function invoked when a suggestion item is pressed.
*
* @param item - The suggestion item that was pressed.
*/
onPress: (item: SuggestionItem) => void;
/**
* Optional callback function invoked when the end of the list is reached.
*/
onEndReached?: () => void;
/**
* Indicates whether the suggestion list is currently loading.
*/
loading?: boolean;
}
export declare const CometChatSuggestionList: (props: CometChatSuggestionListInterface) => React.JSX.Element;