grafana/public/app/core/components/DocsLinkButton.tsx
Joey 22fde6a3f2
Tracing: Add links to documentation in config pages (#66442)
Add links to documentation in config pages and clean up styles
2023-04-13 14:56:35 +01:00

27 lines
557 B
TypeScript

import React from 'react';
import { LinkButton } from '@grafana/ui';
type Props = {
hrefSuffix: string;
};
export function DocsLinkButton(props: Props) {
const { hrefSuffix } = props;
const tooltip = 'Learn more in the Grafana docs';
return (
<LinkButton
aria-label={tooltip}
icon="external-link-alt"
fill="text"
href={`https://grafana.com/docs/grafana/next/datasources/${hrefSuffix}`}
variant="secondary"
size="md"
target="_blank"
tooltip={tooltip}
tooltipPlacement="top"
/>
);
}