Use enum for variant
This commit is contained in:
@@ -37,7 +37,7 @@ import { apiEntityColumns } from './presets';
|
||||
const ApisCard = ({
|
||||
children,
|
||||
variant = 'gridItem',
|
||||
}: PropsWithChildren<{ variant?: string }>) => {
|
||||
}: PropsWithChildren<{ variant?: 'gridItem' }>) => {
|
||||
return (
|
||||
<InfoCard variant={variant} title="Consumed APIs">
|
||||
{children}
|
||||
@@ -48,7 +48,7 @@ const ApisCard = ({
|
||||
type Props = {
|
||||
/** @deprecated The entity is now grabbed from context instead */
|
||||
entity?: Entity;
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const ConsumedApisCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -33,7 +33,7 @@ import { apiEntityColumns } from './presets';
|
||||
const ApisCard = ({
|
||||
children,
|
||||
variant = 'gridItem',
|
||||
}: PropsWithChildren<{ variant?: string }>) => {
|
||||
}: PropsWithChildren<{ variant?: 'gridItem' }>) => {
|
||||
return (
|
||||
<InfoCard variant={variant} title="APIs">
|
||||
{children}
|
||||
@@ -42,7 +42,7 @@ const ApisCard = ({
|
||||
};
|
||||
|
||||
type Props = {
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const HasApisCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -37,7 +37,7 @@ import { apiEntityColumns } from './presets';
|
||||
const ApisCard = ({
|
||||
children,
|
||||
variant = 'gridItem',
|
||||
}: PropsWithChildren<{ variant?: string }>) => {
|
||||
}: PropsWithChildren<{ variant?: 'gridItem' }>) => {
|
||||
return (
|
||||
<InfoCard variant={variant} title="Provided APIs">
|
||||
{children}
|
||||
@@ -48,7 +48,7 @@ const ApisCard = ({
|
||||
type Props = {
|
||||
/** @deprecated The entity is now grabbed from context instead */
|
||||
entity?: Entity;
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const ProvidedApisCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -47,7 +47,7 @@ const ComponentsCard = ({
|
||||
type Props = {
|
||||
/** @deprecated The entity is now grabbed from context instead */
|
||||
entity?: Entity;
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const ConsumingComponentsCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -47,7 +47,7 @@ const ComponentsCard = ({
|
||||
type Props = {
|
||||
/** @deprecated The entity is now grabbed from context instead */
|
||||
entity?: Entity;
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const ProvidingComponentsCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -23,7 +23,7 @@ import { componentEntityColumns, systemEntityColumns } from './presets';
|
||||
|
||||
type Props<T extends Entity> = {
|
||||
title: string;
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
entities: T[];
|
||||
emptyContent?: ReactNode;
|
||||
columns: TableColumn<T>[];
|
||||
|
||||
@@ -41,7 +41,7 @@ const ComponentsCard = ({
|
||||
};
|
||||
|
||||
type Props = {
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const HasComponentsCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const SubcomponentsCard = ({
|
||||
};
|
||||
|
||||
type Props = {
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const HasSubcomponentsCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const SystemsCard = ({
|
||||
};
|
||||
|
||||
type Props = {
|
||||
variant?: string;
|
||||
variant?: 'gridItem';
|
||||
};
|
||||
|
||||
export const HasSystemsCard = ({ variant = 'gridItem' }: Props) => {
|
||||
|
||||
Reference in New Issue
Block a user