UNPKG

react-19-kit

Version:

Ready-to-use Chat UI Components for React(Javascript/Web)

81 lines (80 loc) 3.24 kB
import { CometChatUIKitCalls } from "../../../CometChatUIKit/CometChatCalls"; interface IncomingCallProps { /** * The CometChat call object used to initialize and display the incoming call component. */ call?: any; /** * A builder function for configuring or updating call settings dynamically. * * @param call - The current CometChat call object. * @returns An instance of CallSettingsBuilder. */ callSettingsBuilder?: (call: CometChat.Call) => typeof CometChatUIKitCalls.CallSettingsBuilder; /** * Disables the sound for incoming calls. * @defaultValue false */ disableSoundForCalls?: boolean; /** * Specifies a custom sound to play for incoming calls. */ customSoundForCalls?: string; /** * Callback function triggered when the accept button is clicked. Allows overriding the default behavior. * * @param call - An instance of `CometChat.Call` representing the Call. * @returns void */ onAccept?: (call: CometChat.Call) => void; /** * Callback function triggered when the decline button is clicked. Allows overriding the default behavior. * * @param call - An instance of `CometChat.Call` representing the Call. * @returns void */ onDecline?: (call: CometChat.Call) => void; /** * Callback function triggered when an error occurs in the incoming call component. * @param error - An instance of `CometChat.CometChatException` representing the error. * @return void */ onError?: ((error: CometChat.CometChatException) => void) | null; /** * A function that renders a JSX element to display the item view. * * @param call - An instance of `CometChat.Call` representing the call. * @returns A JSX element to be rendered as the item view. */ itemView?: (call: CometChat.Call) => JSX.Element; /** * A function that renders a JSX element to display the leading view. * * @param call - An instance of `CometChat.Call` representing the call. * @returns A JSX element to be rendered as the leading view. */ leadingView?: (call: CometChat.Call) => JSX.Element; /** * A function that renders a JSX element to display the title view. * * @param call - An instance of `CometChat.Call` representing the call. * @returns A JSX element to be rendered as the title view. */ titleView?: (call: CometChat.Call) => JSX.Element; /** * A function that renders a JSX element to display the subtitle view. * * @param call - An instance of `CometChat.Call` representing the call. * @returns A JSX element to be rendered as the subtitle view. */ subtitleView?: (call: CometChat.Call) => JSX.Element; /** * A function that renders a JSX element to display the trailing view. * * @param call - An instance of `CometChat.Call` representing the call. * @returns A JSX element to be rendered as the trailing view. */ trailingView?: (call: CometChat.Call) => JSX.Element; } declare const CometChatIncomingCall: (props: IncomingCallProps) => import("react/jsx-runtime").JSX.Element; export { CometChatIncomingCall };