import { ComponentProps } from 'react'; import { Button, IconName, LinkButton, Tooltip } from '@grafana/ui'; type TooltipProps = ComponentProps; interface Props { tooltip: TooltipProps['content']; icon: IconName; className?: string; tooltipPlacement?: TooltipProps['placement']; to?: string; target?: string; onClick?: () => void; 'data-testid'?: string; } export const ActionIcon = ({ tooltip, icon, to, target, onClick, className, tooltipPlacement = 'top', ...rest }: Props) => { const ariaLabel = typeof tooltip === 'string' ? tooltip : undefined; return ( {to ? ( ) : (