UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

30 lines 1.76 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import React from 'react'; import { BaseProvider } from '../common/BaseComposite'; import { ChatAdapterProvider } from './adapter/ChatAdapterProvider'; import { chatScreenContainerStyle } from './styles/Chat.styles'; import { ChatScreen } from './ChatScreen'; /** * A customizable UI composite for the chat experience. * * @remarks Chat composite min width and height are respectively 17.5rem and 20rem (280px and 320px, with default rem at 16px) * * @public */ export const ChatComposite = (props) => { const { adapter, options, onFetchAvatarPersonaData, onRenderTypingIndicator, onRenderMessage, onFetchParticipantMenuItems } = props; /* @conditional-compile-remove(file-sharing-acs) */ const formFactor = props['formFactor'] || 'desktop'; return (React.createElement("div", { className: chatScreenContainerStyle }, React.createElement(BaseProvider, Object.assign({}, props), React.createElement(ChatAdapterProvider, { adapter: adapter }, React.createElement(ChatScreen /* @conditional-compile-remove(file-sharing-acs) */ , { /* @conditional-compile-remove(file-sharing-acs) */ formFactor: formFactor, options: options, onFetchAvatarPersonaData: onFetchAvatarPersonaData, onRenderTypingIndicator: onRenderTypingIndicator, onRenderMessage: onRenderMessage, onFetchParticipantMenuItems: onFetchParticipantMenuItems, /* @conditional-compile-remove(file-sharing-acs) */ attachmentOptions: options === null || options === void 0 ? void 0 : options.attachmentOptions }))))); }; //# sourceMappingURL=ChatComposite.js.map