mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
VizTooltip: Update datalinks styling (#93950)
This commit is contained in:
parent
f9f85131a9
commit
47b51326cc
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
||||
|
||||
import { ActionModel, Field, GrafanaTheme2, LinkModel } from '@grafana/data';
|
||||
|
||||
import { Button, ButtonProps, DataLinkButton, Stack } from '..';
|
||||
import { Button, Stack, TextLink } from '..';
|
||||
import { useStyles2 } from '../../themes';
|
||||
import { ActionButton } from '../Actions/ActionButton';
|
||||
|
||||
@ -15,14 +15,19 @@ interface VizTooltipFooterProps {
|
||||
export const ADD_ANNOTATION_ID = 'add-annotation-button';
|
||||
|
||||
const renderDataLinks = (dataLinks: LinkModel[]) => {
|
||||
const buttonProps: ButtonProps = {
|
||||
variant: 'secondary',
|
||||
};
|
||||
|
||||
return (
|
||||
<Stack direction="column" justifyContent="flex-start">
|
||||
{dataLinks.map((link, i) => (
|
||||
<DataLinkButton key={i} link={link} buttonProps={buttonProps} />
|
||||
<TextLink
|
||||
key={i}
|
||||
href={link.href}
|
||||
external={link.target === '_blank'}
|
||||
weight={'medium'}
|
||||
inline={false}
|
||||
variant={'bodySmall'}
|
||||
>
|
||||
{link.title}
|
||||
</TextLink>
|
||||
))}
|
||||
</Stack>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user