From 5f41c5ca5e9769969c94fd7796729a3d4b67dec0 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 25 Jan 2019 13:30:02 +0100 Subject: [PATCH] Rename deprecation warning helper --- .../grafana-ui/src/components/ColorPicker/ColorPicker.tsx | 2 +- .../src/components/ColorPicker/ColorPickerPopover.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx index 0b3eb10c7ed..b6cf176a24b 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPicker.tsx +++ b/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'); diff --git a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx b/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx index fc2d70e3f8f..06b90e6ebc4 100644 --- a/packages/grafana-ui/src/components/ColorPicker/ColorPickerPopover.tsx +++ b/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 extends React this.state = { activePicker: 'palette', }; - handleColorPickerPropsDeprecation('ColorPickerPopover', props); + warnAboutColorPickerPropsDeprecation('ColorPickerPopover', props); } getTabClassName = (tabName: PickerType | keyof T) => {