/*! * Copyright (c) Microsoft Corporation and contributors. All rights reserved. * Licensed under the MIT License. */ // The `MessageBar` component was removed in FluentUI React v9 with no replacement offered. // In the future, we will want to re-write this component to use something else, but for now this import is required. // When these imports are removed, the `@fluentui/react` dependency should be removed from this package. import type { ReactElement } from "react"; import { FluentReact, FluentReactComponents } from "../FluentUi.cjs"; const { MessageBar, MessageBarType, initializeIcons } = FluentReact; const { Button, Link, Tooltip, makeStyles } = FluentReactComponents; // NoDevtoolsErrorBar uses legacy @fluentui/react, which requires explicit icon initialization. initializeIcons(); const useStyles = makeStyles({ root: { "& .ms-MessageBar-icon": { marginTop: "10px", }, }, retryButton: { marginLeft: "5px", }, debugNote: { fontWeight: "normal", marginTop: "0px", marginBottom: "0px", }, }); /** * Core message displayed in the error notice bar. * * @remarks Note: this is only exported for testing purposes. */ export const coreErrorMessage = "It seems that Fluid Devtools has not been initialized in the current tab, or it did not respond in a timely manner."; /** * URL pointing to help documentation for the Devtools. * * @remarks Note: this is only exported for testing purposes. */ export const docsLinkUrl = "https://aka.ms/fluid/devtool/docs"; /** * {@link NoDevtoolsErrorBar} input props. */ export interface NoDevtoolsErrorBarProps { /** * Call to dismiss error notice bar. */ dismiss(): void; /** * Reattempt to find devtools on the page. */ retrySearch(): void; } /** * TODO */ export function NoDevtoolsErrorBar(props: NoDevtoolsErrorBarProps): ReactElement { const { dismiss, retrySearch } = props; const styles = useStyles(); return ( {coreErrorMessage}

Need help? Please refer to our documentation page {" "} for guidance on getting the extension working.{" "}

); }