UNPKG

communication-react-19

Version:

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

35 lines 1.88 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import React from 'react'; import { _TroubleshootingGuideErrorBar, ErrorBar } from "../../../../../react-components/src"; import { FocusZone } from '@fluentui/react'; /** * @private */ export const ConfigurationPageErrorBar = (props) => { const { errorBarProps, /* @conditional-compile-remove(call-readiness) */ showTroubleShootingErrorBar = false, /* @conditional-compile-remove(call-readiness) */ onPermissionsTroubleshootingClick, /* @conditional-compile-remove(call-readiness) */ onNetworkingTroubleShootingClick, /* @conditional-compile-remove(call-readiness) */ permissionsState } = props; /* @conditional-compile-remove(call-readiness) */ const permissionTroubleshootingGuideStrings = { devicePermissionLinkText: 'Troubleshooting Camera and Microphone Permissions', networkTroubleshootingLinkText: 'Troubleshooting Network Connection', dismissButtonText: 'OK' }; /* @conditional-compile-remove(call-readiness) */ if (showTroubleShootingErrorBar) { return (React.createElement(_TroubleshootingGuideErrorBar, Object.assign({ troubleshootingGuideStrings: permissionTroubleshootingGuideStrings, onPermissionsTroubleshootingClick: onPermissionsTroubleshootingClick, onNetworkingTroubleshootingClick: onNetworkingTroubleShootingClick, permissionsState: permissionsState }, errorBarProps, { onDismissError: props.onDismissError }))); } if (errorBarProps.activeErrorMessages.length === 0) { return React.createElement(React.Fragment, null); } return (React.createElement(FocusZone, { shouldFocusOnMount: true }, React.createElement(ErrorBar, Object.assign({}, errorBarProps, { onDismissError: props.onDismissError })))); }; //# sourceMappingURL=ConfigurationPageErrorBar.js.map