Skip to content

Commit

Permalink
Add flag to indicate when focusable is true or not | Fixes liferay#536
Browse files Browse the repository at this point in the history
  • Loading branch information
matuzalemsteles authored and Kien Do committed Feb 21, 2018
1 parent 03f438e commit cadb5ec
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/clay-icon/src/ClayIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ ClayIcon.STATE = {
*/
elementClasses: Config.string(),

/**
* Flag to indicate when svg focusable or not.
* @instance
* @memberof ClayIcon
* @type {?bool}
* @default false
*/
focusable: Config.bool().value(false),

/**
* Id to be applied to the element.
* @instance
Expand Down
7 changes: 7 additions & 0 deletions packages/clay-icon/src/ClayIcon.soy
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
{@param spritemap: string}
{@param symbol: string}
{@param? elementClasses: string}
{@param? focusable: bool}
{@param? id: string}
{@param? title: string}

Expand All @@ -20,6 +21,12 @@
{/if}
"

{if $focusable}
focusable="true"
{else}
focusable="false"
{/if}

{if $id}
id="{$id}"
{/if}
Expand Down

0 comments on commit cadb5ec

Please sign in to comment.