Skip to content

Commit

Permalink
Add support for title to links in dropdowns | Fixes liferay#832
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Lancha committed Apr 23, 2018
1 parent 322e79b commit 88bd151
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/clay-dropdown/src/ClayDropdownBase.soy
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
{param maxItems: $item.maxItems /}
{param separator: $item.separator /}
{param spritemap: $spritemap /}
{param title: $item.title /}
{/delcall}
{/for}
{/template}
Expand Down Expand Up @@ -339,6 +340,7 @@
{@param? maxItems: int}
{@param? separator: bool}
{@param? spritemap: string}
{@param? title: string}

{let $itemContent kind="html"}
{call ClayLink.render}
Expand Down Expand Up @@ -383,6 +385,8 @@
{$iconContent}
{/if}
{/param}

{param title: $title /}
{/call}
{/let}

Expand Down Expand Up @@ -417,6 +421,7 @@
{@param? maxItems: int}
{@param? separator: bool}
{@param? spritemap: string}
{@param? title: string}

{let $checkbox kind="html"}
{call ClayCheckbox.render}
Expand Down Expand Up @@ -466,6 +471,7 @@
{@param? maxItems: int}
{@param? separator: bool}
{@param? spritemap: string}
{@param? title: string}

{if $label and $label != ''}
<li class="dropdown-subheader" role="presentation">
Expand Down Expand Up @@ -506,6 +512,7 @@
{@param? maxItems: int}
{@param? separator: bool}
{@param? spritemap: string}
{@param? title: string}

{let $radio kind="html"}
{call ClayRadio.render}
Expand Down Expand Up @@ -556,6 +563,7 @@
{@param? maxItems: int}
{@param? separator: bool}
{@param? spritemap: string}
{@param? title: string}

{if $label and $label != ''}
<li class="dropdown-subheader" role="presentation">
Expand Down
1 change: 1 addition & 0 deletions packages/clay-dropdown/src/items_validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let itemShape = {
label: Config.oneOfType([Config.number(), Config.string()]),
maxItems: Config.number(),
separator: Config.bool().value(false),
title: Config.string(),
type: Config.oneOf(['checkbox', 'group', 'item', 'radiogroup']).value(
'item'
),
Expand Down
3 changes: 3 additions & 0 deletions packages/clay-management-toolbar/src/validators.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ let actionItemShape = {
label: Config.string().required(),
quickAction: Config.bool(),
separator: Config.bool().value(false),
title: Config.string(),
type: Config.oneOf(['group', 'item']).value('item'),
};

Expand All @@ -21,6 +22,7 @@ let creationMenuItem = {
icon: Config.string(),
label: Config.string().required(),
separator: Config.bool().value(false),
title: Config.string(),
};

const creationMenuItemsValidator = Config.arrayOf(
Expand All @@ -38,6 +40,7 @@ let filterItemShape = {
inputValue: Config.string(),
label: Config.string().required(),
separator: Config.bool().value(false),
title: Config.string(),
type: Config.oneOf(['checkbox', 'group', 'item', 'radiogroup']),
};

Expand Down

0 comments on commit 88bd151

Please sign in to comment.