Chore: Avoid explicit React.FC<Props> when possible (#64722)

This commit is contained in:
Ryan McKinley
2023-03-14 07:38:21 -07:00
committed by GitHub
parent cde1b5b162
commit d710507bc5
213 changed files with 485 additions and 498 deletions

View File

@@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import React, { FC, useCallback } from 'react';
import React, { useCallback } from 'react';
import { GrafanaTheme2, SelectableValue, StandardEditorProps } from '@grafana/data';
import { Select, ColorPicker, useStyles2 } from '@grafana/ui';
@@ -12,7 +12,7 @@ const fixedColorOption: SelectableValue<string> = {
value: '_____fixed_____',
};
export const ColorDimensionEditor: FC<StandardEditorProps<ColorDimensionConfig>> = (props) => {
export const ColorDimensionEditor = (props: StandardEditorProps<ColorDimensionConfig>) => {
const { value, context, onChange } = props;
const defaultColor = 'dark-green';

View File

@@ -1,5 +1,5 @@
import { css } from '@emotion/css';
import React, { FC, useCallback, useMemo } from 'react';
import React, { useCallback, useMemo } from 'react';
import { GrafanaTheme2, SelectableValue, StandardEditorProps } from '@grafana/data';
import { InlineField, InlineFieldRow, Select, useStyles2 } from '@grafana/ui';
@@ -14,7 +14,7 @@ const fixedValueOption: SelectableValue<string> = {
value: '_____fixed_____',
};
export const ScaleDimensionEditor: FC<StandardEditorProps<ScaleDimensionConfig, ScaleDimensionOptions>> = (props) => {
export const ScaleDimensionEditor = (props: StandardEditorProps<ScaleDimensionConfig, ScaleDimensionOptions>) => {
const { value, context, onChange, item } = props;
const { settings } = item;
const styles = useStyles2(getStyles);