Switch to styled-components for EmptyQueryResultsMessage

This commit is contained in:
Koen Vlaswinkel
2023-12-06 11:07:01 +01:00
parent d72f3f40d2
commit 1ed72c6bbe
2 changed files with 18 additions and 17 deletions

View File

@@ -1,14 +1,28 @@
import * as React from "react"; import * as React from "react";
import { styled } from "styled-components";
import { sendTelemetry } from "../common/telemetry"; import { sendTelemetry } from "../common/telemetry";
function sendCodeQLLanguageGuidesTelemetry() { function sendCodeQLLanguageGuidesTelemetry() {
sendTelemetry("codeql-language-guides-link"); sendTelemetry("codeql-language-guides-link");
} }
const Root = styled.div`
height: 300px;
display: flex;
align-items: center;
justify-content: center;
`;
const Container = styled.span`
max-width: 80%;
font-size: 14px;
text-align: center;
`;
export function EmptyQueryResultsMessage(): JSX.Element { export function EmptyQueryResultsMessage(): JSX.Element {
return ( return (
<div className="vscode-codeql__empty-query-message"> <Root>
<span> <Container>
This query returned no results. If this isn&apos;t what you were This query returned no results. If this isn&apos;t what you were
expecting, and for effective query-writing tips, check out the{" "} expecting, and for effective query-writing tips, check out the{" "}
<a <a
@@ -18,7 +32,7 @@ export function EmptyQueryResultsMessage(): JSX.Element {
CodeQL language guides CodeQL language guides
</a> </a>
. .
</span> </Container>
</div> </Root>
); );
} }

View File

@@ -168,19 +168,6 @@ td.vscode-codeql__path-index-cell {
opacity: 0.6; opacity: 0.6;
} }
.vscode-codeql__empty-query-message {
height: 300px;
display: flex;
align-items: center;
justify-content: center;
}
.vscode-codeql__empty-query-message > span {
max-width: 80%;
font-size: 14px;
text-align: center;
}
.vscode-codeql__result-table-location-link { .vscode-codeql__result-table-location-link {
text-decoration: none; text-decoration: none;
} }