Add progress ring in 'stop evaluation' button (#3383)

This commit is contained in:
Charis Kyriakou
2024-02-20 16:44:47 +00:00
committed by GitHub
parent 46a15bfdd6
commit 0533dad9ea

View File

@@ -3,6 +3,7 @@ import type { ToModelEditorMessage } from "../../common/interface-types";
import { import {
VSCodeButton, VSCodeButton,
VSCodeCheckbox, VSCodeCheckbox,
VSCodeProgressRing,
VSCodeTag, VSCodeTag,
} from "@vscode/webview-ui-toolkit/react"; } from "@vscode/webview-ui-toolkit/react";
import { styled } from "styled-components"; import { styled } from "styled-components";
@@ -74,6 +75,12 @@ const ButtonsContainer = styled.div`
margin-top: 1rem; margin-top: 1rem;
`; `;
const ProgressRing = styled(VSCodeProgressRing)`
width: 16px;
height: 16px;
margin-right: 5px;
`;
const ModelEvaluation = ({ const ModelEvaluation = ({
viewState, viewState,
modeledMethods, modeledMethods,
@@ -112,6 +119,7 @@ const ModelEvaluation = ({
} else { } else {
return ( return (
<VSCodeButton onClick={onStopEvaluation} appearance="secondary"> <VSCodeButton onClick={onStopEvaluation} appearance="secondary">
<ProgressRing />
Stop evaluation Stop evaluation
</VSCodeButton> </VSCodeButton>
); );