UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

53 lines 1.54 kB
import React from 'react'; import { Call } from '@azure/communication-calling'; import { TeamsCall } from '@azure/communication-calling'; /** * @private */ export type CallContextType = { call: Call | TeamsCall | undefined; }; /** * Arguments to initialize a {@link CallProvider}. * * @public */ export interface CallProviderProps { children: React.ReactNode; call?: Call | TeamsCall; } /** * @private */ export declare const CallContext: React.Context<CallContextType | undefined>; /** * A {@link React.Context} that stores a {@link @azure/communication-calling#Call}. * * Calling components from this package must be wrapped with a {@link CallProvider}. * * @public */ export declare const CallProvider: (props: CallProviderProps) => JSX.Element; /** * Hook to obtain {@link @azure/communication-calling#Call} from the provider. * * Useful when implementing a custom component that utilizes the providers * exported from this library. * * you must have previously used the CallProvider with a Call object to use this hook * * @public */ export declare const useCall: () => Call | undefined; /** * Hook to obtain {@link @azure/communication-calling#TeamsCall} from the provider. * * Useful when implementing a custom component that utilizes the providers * exported from this library. * * you must have previously used the CallProvider with a TeamsCall object to use this hook * * @public */ export declare const useTeamsCall: () => undefined | TeamsCall; //# sourceMappingURL=CallProvider.d.ts.map