Skip to content

Commit

Permalink
Fixes liferay#1242 - Adds an alert informing the discontinuation of t…
Browse files Browse the repository at this point in the history
…he title and focusable API
  • Loading branch information
matuzalemsteles committed Nov 26, 2018
1 parent ba3d1e2 commit b59a322
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions packages/clay-icon/src/ClayIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ ClayIcon.STATE = {
*/
elementClasses: Config.string(),

/**
* Flag to indicate if the svg is focusable or not
* @default false
* @deprecated since version 2.4.x
* @instance
* @memberof ClayIcon
* @type {?bool}
*/
focusable: Config.validator(value => {
if (value) {
console.warn(
'🚨 The `focusable` API will be deprecated and removed in the next release. See more information https://goo.gl/EycJtK'
);
}
}),

/**
* Id to be applied to the element.
* @default undefined
Expand All @@ -52,6 +68,22 @@ ClayIcon.STATE = {
* @type {!string}
*/
symbol: Config.string().required(),

/**
* The title of the Clay SVG Icon.
* @default undefined
* @deprecated since version 2.4.x
* @instance
* @memberof ClayIcon
* @type {?(string|undefined)}
*/
title: Config.validator(value => {
if (value) {
console.warn(
'🚨 The `title` API will be deprecated and removed in the next release. See more information https://goo.gl/EycJtK'
);
}
}),
};

defineWebComponent('clay-icon', ClayIcon);
Expand Down

0 comments on commit b59a322

Please sign in to comment.