Get rid of usages of the old Button

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-02-20 11:09:08 +01:00
parent bc6653f4e2
commit c10384a923
16 changed files with 59 additions and 43 deletions
@@ -19,7 +19,7 @@ import { toLowerMaybe } from '../../../helpers';
import { Entity } from '@backstage/catalog-model';
import { useApi, useRouteRef, configApiRef } from '@backstage/core-plugin-api';
import {
Button,
LinkButton,
ItemCardGrid,
ItemCardHeader,
} from '@backstage/core-components';
@@ -58,7 +58,7 @@ export const DocsCardGrid = (props: DocsCardGridProps) => {
</CardMedia>
<CardContent>{entity.metadata.description}</CardContent>
<CardActions>
<Button
<LinkButton
to={getRouteToReaderPageFor({
namespace: toLowerMaybe(
entity.metadata.namespace ?? 'default',
@@ -71,7 +71,7 @@ export const DocsCardGrid = (props: DocsCardGridProps) => {
data-testid="read_docs"
>
Read Docs
</Button>
</LinkButton>
</CardActions>
</Card>
))}
@@ -25,7 +25,7 @@ import {
} from '@backstage/plugin-catalog-react';
import { rootDocsRouteRef } from '../../../routes';
import {
Button,
LinkButton,
EmptyState,
Table,
TableColumn,
@@ -121,13 +121,13 @@ export const DocsTable = (props: DocsTableProps) => {
title="No documents to show"
description="Create your own document. Check out our Getting Started Information"
action={
<Button
<LinkButton
color="primary"
to="https://backstage.io/docs/features/techdocs/getting-started"
variant="contained"
>
DOCS
</Button>
</LinkButton>
}
/>
)}