Use enum for variant

This commit is contained in:
Oliver Sand
2021-02-16 12:22:17 +01:00
parent 5a892f9dc8
commit 584dd21454
9 changed files with 12 additions and 12 deletions
@@ -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) => {