From b59a322ef54fc2a9626803f2e54bbe0386bef200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matuzal=C3=A9m=20Teles?= Date: Mon, 26 Nov 2018 20:18:39 -0300 Subject: [PATCH] Fixes #1242 - Adds an alert informing the discontinuation of the title and focusable API --- packages/clay-icon/src/ClayIcon.js | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/packages/clay-icon/src/ClayIcon.js b/packages/clay-icon/src/ClayIcon.js index af623dcd8c..762eef9688 100644 --- a/packages/clay-icon/src/ClayIcon.js +++ b/packages/clay-icon/src/ClayIcon.js @@ -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 @@ -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);