mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DataLinksInlineEditor: updates component with the new theme model (#33391)
This commit is contained in:
parent
6c7290164e
commit
faa80003b9
@ -1,10 +1,10 @@
|
||||
import { DataFrame, DataLink, GrafanaTheme, VariableSuggestion } from '@grafana/data';
|
||||
import { DataFrame, DataLink, GrafanaThemeV2, VariableSuggestion } from '@grafana/data';
|
||||
import React, { useState } from 'react';
|
||||
import { css } from '@emotion/css';
|
||||
import { Button } from '../../Button/Button';
|
||||
import { cloneDeep } from 'lodash';
|
||||
import { Modal } from '../../Modal/Modal';
|
||||
import { stylesFactory, useTheme } from '../../../themes';
|
||||
import { stylesFactory, useTheme2 } from '../../../themes';
|
||||
import { DataLinksListItem } from './DataLinksListItem';
|
||||
import { DataLinkEditorModalContent } from './DataLinkEditorModalContent';
|
||||
|
||||
@ -21,7 +21,7 @@ export const DataLinksInlineEditor: React.FC<DataLinksInlineEditorProps> = ({
|
||||
getSuggestions,
|
||||
data,
|
||||
}) => {
|
||||
const theme = useTheme();
|
||||
const theme = useTheme2();
|
||||
const [editIndex, setEditIndex] = useState<number | null>(null);
|
||||
const [isNew, setIsNew] = useState(false);
|
||||
|
||||
@ -111,10 +111,10 @@ export const DataLinksInlineEditor: React.FC<DataLinksInlineEditorProps> = ({
|
||||
);
|
||||
};
|
||||
|
||||
const getDataLinksInlineEditorStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
const getDataLinksInlineEditorStyles = stylesFactory((theme: GrafanaThemeV2) => {
|
||||
return {
|
||||
wrapper: css`
|
||||
margin-bottom: ${theme.spacing.md};
|
||||
margin-bottom: ${theme.spacing(2)};
|
||||
`,
|
||||
};
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user