@azure/communication-react
Version:
React library for building modern communication user experiences utilizing Azure Communication Services
27 lines • 985 B
JavaScript
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { Stack } from '@fluentui/react';
import React from 'react';
import * as reselect from 'reselect';
import { chatHeaderContainerStyle, topicNameLabelStyle } from './styles/Chat.styles';
/**
* @private
*/
export const ChatHeader = (props) => {
return React.createElement(Stack, { className: chatHeaderContainerStyle, horizontal: true },
React.createElement(Stack.Item, { align: "center" },
React.createElement("div", { className: topicNameLabelStyle }, props.topic)));
};
const getTopicName = (state, props) => {
var _a, _b;
return ((_b = (_a = state.threads[props.threadId]) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.topic) || '';
};
/**
* @private
*/
export const getHeaderProps = reselect.createSelector([getTopicName], (topic) => {
return {
topic: topic
};
});
//# sourceMappingURL=ChatHeader.js.map