From 3ffcd5c4379c58205aa23e78a9ba75bfd2019e8e Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Mon, 23 May 2016 18:26:40 +0200 Subject: [PATCH] messages for deprecated features --- src/defaultRenderer.js | 5 +++++ src/index.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/defaultRenderer.js b/src/defaultRenderer.js index eee8fa7..5684ba1 100644 --- a/src/defaultRenderer.js +++ b/src/defaultRenderer.js @@ -12,6 +12,11 @@ export const defaultRenderer = (options = {}) => (tag, size, key, handlers = {}) const className = 'tag-cloud-tag'; const fontSize = size + 'px'; + if (props.disableRandomColor) { + // eslint-disable-next-line no-console + console.warn("Using deprecated property 'disableRandomColor' passed to prop option of defaultRenderer. " + + "It will be removed in the next major release and replaced with it's own option 'disableRandomColor'."); + } const color = (props.disableRandomColor || disableRandomColor) ? tag.color || undefined : randomColor(colorOptions); const eventHandlers = {}; diff --git a/src/index.js b/src/index.js index 5fdb985..0feef96 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ import { defaultRenderer } from './defaultRenderer'; const deprecatedRendererExport = (...args) => { // eslint-disable-next-line no-console - console.warn(`Using deprecated 'DefaultRenderer' import, it will be removed in the next release and replaced with 'defaultRenderer'.`); + console.warn(`Using deprecated 'DefaultRenderer' import, it will be removed in the next major release and replaced with 'defaultRenderer'.`); return defaultRenderer(...args); };