Rename deprecation warning helper

This commit is contained in:
Dominik Prokop
2019-01-25 13:30:02 +01:00
parent 3c60f98d13
commit 5f41c5ca5e
2 changed files with 3 additions and 3 deletions

View File

@@ -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');

View File

@@ -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) => {