mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Rename deprecation warning helper
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user