-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flyout Bounding Box legend & accessibility fixes (#2497)
* added bb legend * added tokens variables * localization & accessibility fixes * simplified stack * refactor * refactor * refactor * new file component refactor * auto lint fixes
- Loading branch information
Showing
4 changed files
with
123 additions
and
51 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
libs/interpret-vision/src/lib/VisionExplanationDashboard/Controls/DetectionDetails.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT License. | ||
|
||
import { Stack, Text } from "@fluentui/react"; | ||
import { IVisionListItem } from "@responsible-ai/core-ui"; | ||
import { localization } from "@responsible-ai/localization"; | ||
import React from "react"; | ||
|
||
import { stackTokens } from "./FlyoutObjectDetectionUtils"; | ||
|
||
interface IDetectionDetailsProps { | ||
item: IVisionListItem; // replace with actual type | ||
correctDetections: string; | ||
incorrectDetections: string; | ||
} | ||
export class DetectionDetails extends React.Component<IDetectionDetailsProps> { | ||
public render(): React.ReactNode { | ||
return ( | ||
<Stack | ||
tokens={stackTokens.large} | ||
horizontalAlign="start" | ||
verticalAlign="start" | ||
> | ||
<Stack | ||
horizontal | ||
tokens={stackTokens.medium} | ||
horizontalAlign="center" | ||
verticalAlign="center" | ||
/> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.indexLabel} | ||
{this.props.item?.index} | ||
</Text> | ||
</Stack.Item> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.correctDetections} | ||
{this.props.correctDetections} | ||
</Text> | ||
</Stack.Item> | ||
<Stack.Item> | ||
<Text variant="large"> | ||
{localization.InterpretVision.Dashboard.incorrectDetections} | ||
{this.props.incorrectDetections} | ||
</Text> | ||
</Stack.Item> | ||
</Stack> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters