UX: Move buttons into the nav section of the topic map

This commit is contained in:
Robin Ward 2017-08-22 14:19:55 -04:00
parent 117ce24ac3
commit 7e8766cee8
1 changed files with 9 additions and 9 deletions

View File

@ -109,7 +109,14 @@ createWidget('topic-map-summary', {
contents.push(h('li.avatars', participants));
}
return h('ul.clearfix', contents);
const nav = h('nav.buttons', this.attach('button', {
title: 'topic.toggle_information',
icon: state.collapsed ? 'chevron-down' : 'chevron-up',
action: 'toggleMap',
className: 'btn',
}));
return [nav, h('ul.clearfix', contents)];
}
});
@ -209,14 +216,7 @@ export default createWidget('topic-map', {
},
html(attrs, state) {
const nav = h('nav.buttons', this.attach('button', {
title: 'topic.toggle_information',
icon: state.collapsed ? 'chevron-down' : 'chevron-up',
action: 'toggleMap',
className: 'btn',
}));
const contents = [nav, this.attach('topic-map-summary', attrs, { state })];
const contents = [this.attach('topic-map-summary', attrs, { state })];
if (!state.collapsed) {
contents.push(this.attach('topic-map-expanded', attrs));