@azure/communication-react
Version:
React library for building modern communication user experiences utilizing Azure Communication Services
58 lines • 1.84 kB
TypeScript
import React from 'react';
/** @private */
export interface SidePaneRenderer {
/** Side pane header content to render */
headerRenderer?: () => JSX.Element;
/** Side pane body content to render */
contentRenderer?: () => JSX.Element;
/** An id for identifying the side pane in events like `onSidePaneIdChanged` */
id: string;
}
/** @private */
export type InjectedSidePaneProps = {
renderer: SidePaneRenderer;
/**
* Whether the side pane showing the override content is displayed
*/
isActive: boolean;
/**
* Useful to ensure the side pane renders the content of the override even if the side pane is closed.
* This avoids remounting the content when the side pane is opened again.
* This typically improves performance of opening the side pane, but may impact the overall performance of the app.
*
* @default false
*/
persistRenderingWhenClosed?: boolean;
};
interface SidePaneContextProps {
sidePaneRenderer?: SidePaneRenderer;
overrideSidePane?: InjectedSidePaneProps;
}
/**
* Context for side pane interaction
*
* @private
*/
export declare const SidePaneContext: React.Context<SidePaneContextProps>;
/**
* Props to LocalizationProvider
*
* @private
*/
export type SidePaneProviderProps = SidePaneContextProps & {
children: React.ReactNode;
};
/**
* Provider to provide localized strings for this library's composites.
*
* @private
*/
export declare const SidePaneProvider: (props: SidePaneProviderProps) => JSX.Element;
/** @private */
export declare const useSidePaneContext: () => SidePaneContextProps;
/** @private */
export declare const useIsSidePaneOpen: () => boolean;
/** @private */
export declare const useIsParticularSidePaneOpen: (sidePaneId: string) => boolean;
export {};
//# sourceMappingURL=SidePaneProvider.d.ts.map