Skip to content

Commit

Permalink
Updating popover with new admin changes & removing redundant styles
Browse files Browse the repository at this point in the history
  • Loading branch information
ScopeyNZ committed Oct 28, 2018
1 parent 2d17052 commit 0059dfa
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 102 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/styles/bundle.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions client/src/components/ElementEditor/AddElementPopover.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,16 @@ class AddElementPopover extends Component {
extraClass
);

const buttons = elementTypes.map(({ name, title, icon }) => ({
text: title,
key: name,
className: classNames(icon, 'btn--icon-xl', 'element-editor-add-element__button'),
const buttons = elementTypes.map((elementType) => ({
content: elementType.title,
key: elementType.name,
className: classNames(elementType.icon, 'btn--icon-xl', 'element-editor-add-element__button'),
onClick: this.getElementButtonClickHandler(elementType),
}));

return (
<PopoverOptionSetComponent
buttons={buttons}
onButtonClick={this.handleButtonClick}
searchPlaceholder={i18n._t('AddElementPopover.SEARCH_BLOCKS', 'Search blocks')}
extraClass={popoverClassNames}
container={container}
Expand Down
Loading

0 comments on commit 0059dfa

Please sign in to comment.