UNPKG

@azure/communication-react

Version:

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

49 lines 1.48 kB
import { CallAgent } from '@azure/communication-calling'; import { TeamsCallAgent } from '@azure/communication-calling'; import React from 'react'; /** * @private */ export type CallAgentContextType = { callAgent: CallAgent | TeamsCallAgent | undefined; }; /** * @private */ export declare const CallAgentContext: React.Context<CallAgentContextType | undefined>; /** * Arguments to initialize a {@link CallAgentProvider}. * * @public */ export interface CallAgentProviderProps { children: React.ReactNode; callAgent?: CallAgent | TeamsCallAgent; } /** * A {@link React.Context} that stores a {@link @azure/communication-calling#CallAgent}. * * Calling components from this package must be wrapped with a {@link CallAgentProvider}. * * @public */ export declare const CallAgentProvider: (props: CallAgentProviderProps) => JSX.Element; /** * Hook to obtain {@link @azure/communication-calling#CallAgent} from the provider. * * Useful when implementing a custom component that utilizes the providers * exported from this library. * * @public */ export declare const useCallAgent: () => CallAgent | undefined; /** * Hook to obtain {@link @azure/communication-calling#TeamsCallAgent} from the provider. * * Useful when implementing a custom component that utilizes the providers * exported from this library. * * @public */ export declare const useTeamsCallAgent: () => undefined | TeamsCallAgent; //# sourceMappingURL=CallAgentProvider.d.ts.map