import { Icon, Link, Stack, Text } from "@fluentui/react"; import React from "react"; import { useNotificationConsole } from "../../hooks/useNotificationConsole"; export interface PanelInfoErrorProps { message: string; messageType: string; showErrorDetails: boolean; link?: string; linkText?: string; formError?: boolean; } export const PanelInfoErrorComponent: React.FunctionComponent = ({ message, messageType, showErrorDetails, link, linkText, }: PanelInfoErrorProps): JSX.Element => { const expandConsole = useNotificationConsole((state) => state.expandConsole); let icon: JSX.Element = ; if (messageType === "error") { icon = ; } else if (messageType === "warning") { icon = ; } else if (messageType === "info") { icon = ; } return ( {icon} {message} {link && linkText && ( {" " + linkText} )} {showErrorDetails && ( More details )} ); };