Switch to CodeSnippet component

This commit is contained in:
Adam Harvey
2021-02-08 10:54:48 -05:00
parent e73f35b1ea
commit d84cb8199d
3 changed files with 12 additions and 4 deletions
@@ -22,6 +22,7 @@ import {
RELATION_PART_OF,
} from '@backstage/catalog-model';
import {
CodeSnippet,
Table,
TableColumn,
TableFilter,
@@ -152,7 +153,7 @@ export const ApiExplorerTable = ({
if (error) {
return (
<WarningPanel severity="error" title="Could not fetch catalog entities.">
<code>{error.toString()}</code>
<CodeSnippet language="text" text={error.toString()} />
</WarningPanel>
);
}
@@ -19,7 +19,13 @@ import {
RELATION_OWNED_BY,
RELATION_PART_OF,
} from '@backstage/catalog-model';
import { Table, TableColumn, TableProps, WarningPanel } from '@backstage/core';
import {
CodeSnippet,
Table,
TableColumn,
TableProps,
WarningPanel,
} from '@backstage/core';
import {
EntityRefLink,
EntityRefLinks,
@@ -131,7 +137,7 @@ export const CatalogTable = ({
severity="error"
title="Could not fetch catalog entities."
>
<code>{error.toString()}</code>
<CodeSnippet language="text" text={error.toString()} />
</WarningPanel>
</div>
);
@@ -15,6 +15,7 @@
*/
import {
CodeSnippet,
Content,
Header,
ItemCard,
@@ -67,7 +68,7 @@ export const TechDocsHome = () => {
severity="error"
title="Could not load available documentation."
>
<code>{error.message}</code>
<CodeSnippet language="text" text={error.toString()} />
</WarningPanel>
</Content>
</Page>