Chore: Migrate more usage of v1 themes to v2 (#57680)

* Chore: Migrate more usage of v1 themes to v2

* Implement suggested changes
This commit is contained in:
kay delaney
2022-11-02 10:25:08 +00:00
committed by GitHub
parent dd5e3a0818
commit 30dc0f56a4
30 changed files with 266 additions and 275 deletions
@@ -4,11 +4,11 @@ import React from 'react';
import {
DataSourceJsonData,
DataSourcePluginOptionsEditorProps,
GrafanaTheme,
GrafanaTheme2,
toOption,
updateDatasourcePluginJsonDataOption,
} from '@grafana/data';
import { InlineField, InlineFieldRow, Input, Select, useStyles } from '@grafana/ui';
import { InlineField, InlineFieldRow, Input, Select, useStyles2 } from '@grafana/ui';
export interface SpanBarOptions {
type?: string;
@@ -26,7 +26,7 @@ export const TAG = 'Tag';
interface Props extends DataSourcePluginOptionsEditorProps<SpanBarOptionsData> {}
export default function SpanBarSettings({ options, onOptionsChange }: Props) {
const styles = useStyles(getStyles);
const styles = useStyles2(getStyles);
const selectOptions = [NONE, DURATION, TAG].map(toOption);
return (
@@ -76,11 +76,11 @@ export default function SpanBarSettings({ options, onOptionsChange }: Props) {
);
}
const getStyles = (theme: GrafanaTheme) => ({
const getStyles = (theme: GrafanaTheme2) => ({
infoText: css`
label: infoText;
padding-bottom: ${theme.spacing.md};
color: ${theme.colors.textSemiWeak};
padding-bottom: ${theme.spacing(2)};
color: ${theme.colors.text.secondary};
`,
row: css`