Use a more strict type for variant of cards

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-02-17 11:41:39 +01:00
parent 2d8e78ed4c
commit f4c2bcf54b
15 changed files with 74 additions and 44 deletions
@@ -14,24 +14,25 @@
* limitations under the License.
*/
import React, { useEffect } from 'react';
import { Entity } from '@backstage/catalog-model';
import {
EmptyState,
ErrorApi,
errorApiRef,
InfoCard,
InfoCardVariants,
MissingAnnotationEmptyState,
Progress,
useApi,
} from '@backstage/core';
import SentryIssuesTable from '../SentryIssuesTable/SentryIssuesTable';
import React, { useEffect } from 'react';
import { useAsync } from 'react-use';
import { sentryApiRef } from '../../api';
import SentryIssuesTable from '../SentryIssuesTable/SentryIssuesTable';
import {
SENTRY_PROJECT_SLUG_ANNOTATION,
useProjectSlug,
} from '../useProjectSlug';
import { Entity } from '@backstage/catalog-model';
export const SentryIssuesWidget = ({
entity,
@@ -40,7 +41,7 @@ export const SentryIssuesWidget = ({
}: {
entity: Entity;
statsFor?: '24h' | '12h';
variant?: string;
variant?: InfoCardVariants;
}) => {
const errorApi = useApi<ErrorApi>(errorApiRef);
const sentryApi = useApi(sentryApiRef);