import * as React from "react"; import { Icon, Label, Stack, HoverCard, HoverCardType, Link } from "@fluentui/react"; import { CodeOfConductEndpoints } from "../../../../Common/Constants"; import "./InfoComponent.less"; export interface InfoComponentProps { onReportAbuseClick?: () => void; } export class InfoComponent extends React.Component { private getInfoPanel = (iconName: string, labelText: string, url?: string, onClick?: () => void): JSX.Element => { return (
); }; private onHover = (): JSX.Element => { return ( {this.getInfoPanel("Script", "Code of Conduct", CodeOfConductEndpoints.codeOfConduct)} {this.getInfoPanel("RedEye", "Privacy Statement", CodeOfConductEndpoints.privacyStatement)} {this.getInfoPanel("KnowledgeArticle", "Microsoft Terms of Use", CodeOfConductEndpoints.termsOfUse)} {this.props.onReportAbuseClick && ( {this.getInfoPanel("ReportHacked", "Report Abuse", undefined, () => this.props.onReportAbuseClick())} )} ); }; public render(): JSX.Element { return (
); } }