UNPKG

communication-react-19

Version:

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

47 lines 1.89 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import React, { createContext, useContext } from 'react'; const defaultIdentifiers = { sendboxTextField: 'sendbox-textfield', participantButtonPeopleMenuItem: 'participant-button-people-menu-item', participantItemMenuButton: 'participant-item-menu-button', participantList: 'participant-list', participantListPeopleButton: 'participant-list-people-button', participantListRemoveParticipantButton: 'participant-list-remove-participant-button', messageContent: 'message-content', messageTimestamp: 'message-timestamp', typingIndicator: 'typing-indicator', videoGallery: 'video-gallery', videoTile: 'video-tile', overflowGalleryLeftNavButton: 'overflow-gallery-left-nav-button', overflowGalleryRightNavButton: 'overflow-gallery-right-nav-button', verticalGalleryVideoTile: 'vertical-gallery-video-tile', horizontalGalleryVideoTile: 'horizontal-gallery-video-tile', verticalGalleryPageCounter: 'vertical-gallery-page-counter', /* @conditional-compile-remove(mention) */ mentionSuggestionList: 'mention-suggestion-list', /* @conditional-compile-remove(mention) */ mentionSuggestionItem: 'mention-suggestion-item' }; /** * @private */ export const IdentifierContext = createContext(defaultIdentifiers); /** * React Context provider for {@link _Identifiers}. * * @experimental * * See documentation for {@link _Identifiers}. * * @internal */ export const _IdentifierProvider = (props) => { const { identifiers, children } = props; return React.createElement(IdentifierContext.Provider, { value: identifiers !== null && identifiers !== void 0 ? identifiers : defaultIdentifiers }, children); }; /** * @private */ export const useIdentifiers = () => useContext(IdentifierContext); //# sourceMappingURL=IdentifierProvider.js.map