Skip to content

Commit

Permalink
messages for deprecated features
Browse files Browse the repository at this point in the history
  • Loading branch information
madox2 committed May 23, 2016
1 parent 244583e commit 3ffcd5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/defaultRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit 3ffcd5c

Please sign in to comment.