diff --git a/packages/grafana-ui/src/components/DataLinks/DataLinkEditor.tsx b/packages/grafana-ui/src/components/DataLinks/DataLinkEditor.tsx
index 159161af151..df079db03dc 100644
--- a/packages/grafana-ui/src/components/DataLinks/DataLinkEditor.tsx
+++ b/packages/grafana-ui/src/components/DataLinks/DataLinkEditor.tsx
@@ -20,17 +20,6 @@ interface DataLinkEditorProps {
showOneClick?: boolean;
}
-const getStyles = (theme: GrafanaTheme2) => ({
- listItem: css({
- marginBottom: theme.spacing(),
- }),
- infoText: css({
- paddingBottom: theme.spacing(2),
- marginLeft: '66px',
- color: theme.colors.text.secondary,
- }),
-});
-
export const DataLinkEditor = memo(
({ index, value, onChange, suggestions, isLast, showOneClick = false }: DataLinkEditorProps) => {
const styles = useStyles2(getStyles);
@@ -55,6 +44,7 @@ export const DataLinkEditor = memo(
-
+
{showOneClick && (
@@ -77,17 +67,15 @@ export const DataLinkEditor = memo(
'Only one link can have one click enabled at a time'
)}
>
-
+
)}
{isLast && (
-
-
- With data links you can reference data variables like series name, labels and values. Type CMD+Space,
- CTRL+Space, or $ to open variable suggestions.
-
-
+
+ With data links you can reference data variables like series name, labels and values. Type CMD+Space,
+ CTRL+Space, or $ to open variable suggestions.
+
)}
);
@@ -95,3 +83,14 @@ export const DataLinkEditor = memo(
);
DataLinkEditor.displayName = 'DataLinkEditor';
+
+const getStyles = (theme: GrafanaTheme2) => ({
+ listItem: css({
+ marginBottom: theme.spacing(),
+ }),
+ infoText: css({
+ paddingBottom: theme.spacing(2),
+ marginLeft: '66px',
+ color: theme.colors.text.secondary,
+ }),
+});
diff --git a/packages/grafana-ui/src/utils/i18n.tsx b/packages/grafana-ui/src/utils/i18n.tsx
index 5e688f48fee..83fcce10b8b 100644
--- a/packages/grafana-ui/src/utils/i18n.tsx
+++ b/packages/grafana-ui/src/utils/i18n.tsx
@@ -29,6 +29,7 @@ type I18NextTransProps = Parameters[0];
interface TransProps extends I18NextTransProps {
i18nKey: string;
+ className?: string;
}
export const Trans = (props: TransProps): ReactElement => {