瀏覽代碼

Rename deprecation warning helper

Dominik Prokop 7 年之前
父節點
當前提交
5f41c5ca5e

+ 1 - 1
packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx

@@ -22,7 +22,7 @@ export interface ColorPickerProps extends Themeable {
   children?: JSX.Element;
 }
 
-export const handleColorPickerPropsDeprecation = (componentName: string, props: ColorPickerProps) => {
+export const warnAboutColorPickerPropsDeprecation = (componentName: string, props: ColorPickerProps) => {
   const { onColorChange } = props;
   if (onColorChange) {
     propDeprecationWarning(componentName, 'onColorChange', 'onChange');

+ 2 - 2
packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx

@@ -1,7 +1,7 @@
 import React from 'react';
 import { NamedColorsPalette } from './NamedColorsPalette';
 import { getColorName, getColorFromHexRgbOrName } from '../../utils/namedColorsPalette';
-import { ColorPickerProps, handleColorPickerPropsDeprecation } from './ColorPicker';
+import { ColorPickerProps, warnAboutColorPickerPropsDeprecation } from './ColorPicker';
 import { GrafanaTheme } from '../../types';
 import { PopperContentProps } from '../Tooltip/PopperController';
 import SpectrumPalette from './SpectrumPalette';
@@ -28,7 +28,7 @@ export class ColorPickerPopover<T extends CustomPickersDescriptor> extends React
     this.state = {
       activePicker: 'palette',
     };
-    handleColorPickerPropsDeprecation('ColorPickerPopover', props);
+    warnAboutColorPickerPropsDeprecation('ColorPickerPopover', props);
   }
 
   getTabClassName = (tabName: PickerType | keyof T) => {