Skip to content

Commit

Permalink
Fixes #1209 - Add support for title
Browse files Browse the repository at this point in the history
  • Loading branch information
boton committed Oct 1, 2018
1 parent 0a14437 commit b184df6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/clay-sticker/src/ClaySticker.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@ ClaySticker.STATE = {
'unstyled',
'warning',
]).value('primary'),

/**
* Title to be applied to the sticker element.
* @default undefined
* @instance
* @memberof ClaySticker
* @type {?(string|undefined)}
*/
title: Config.string(),
};

defineWebComponent('clay-sticker', ClaySticker);
Expand Down
5 changes: 5 additions & 0 deletions packages/clay-sticker/src/ClaySticker.soy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{@param? size: string}
{@param? spritemap: string}
{@param? style: string}
{@param? title: string}

{let $attributes kind="attributes"}
class="sticker
Expand All @@ -42,6 +43,10 @@
{if $id}
id="{$id}"
{/if}

{if $title}
title="{$title}"
{/if}
{/let}

<span {$attributes}>
Expand Down

0 comments on commit b184df6

Please sign in to comment.