Skip to content

Commit

Permalink
Refactor button styles list, Now it uses dropdown button.
Browse files Browse the repository at this point in the history
Fixes #557
  • Loading branch information
antoniopol06 committed Jul 6, 2016
1 parent 50c9425 commit dd996f7
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/ui/react/src/components/buttons/button-styles-list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,18 @@
}

return (
<div className="ae-dropdown ae-arrow-box ae-arrow-box-top-left" onFocus={this.focus} onKeyDown={this.handleKey} tabIndex="0">
<ul className="ae-listbox" role="listbox">
{removeStylesItem}
<AlloyEditor.ButtonDropdown {...this.props}>
{removeStylesItem}

<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.blockStyles} styles={this._blockStyles} />
{this._renderStylesItems(this._blockStyles)}
<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.blockStyles} styles={this._blockStyles} />
{this._renderStylesItems(this._blockStyles)}

<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.inlineStyles} styles={this._inlineStyles} />
{this._renderStylesItems(this._inlineStyles)}
<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.inlineStyles} styles={this._inlineStyles} />
{this._renderStylesItems(this._inlineStyles)}

<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.objectStyles} styles={this._objectStyles} />
{this._renderStylesItems(this._objectStyles)}
</ul>
</div>
<AlloyEditor.ButtonsStylesListHeader name={AlloyEditor.Strings.objectStyles} styles={this._objectStyles} />
{this._renderStylesItems(this._objectStyles)}
</AlloyEditor.ButtonDropdown>
);
},

Expand Down

0 comments on commit dd996f7

Please sign in to comment.