Files
grafana/public/app/features/migrate-to-cloud/shared/InfoItem.tsx
Josh Hunt 00d6e1d7f8 E2C: Move frontend feature folder up one (#84851)
* E2C: Move frontedn folder up one

* codeowners
2024-03-20 19:39:39 +02:00

25 lines
580 B
TypeScript

import React, { ReactNode } from 'react';
import { Stack, Text, TextLink } from '@grafana/ui';
interface Props {
children: NonNullable<ReactNode>;
title: string;
linkTitle?: string;
linkHref?: string;
}
export const InfoItem = ({ children, title, linkHref, linkTitle }: Props) => {
return (
<Stack gap={2} direction="column">
<Text element="h4">{title}</Text>
<Text color="secondary">{children}</Text>
{linkHref && (
<TextLink href={linkHref} external>
{linkTitle ?? linkHref}
</TextLink>
)}
</Stack>
);
};