tab-bar/toolbar alignment

This commit is contained in:
Adam Bradley
2015-04-10 15:36:43 -05:00
parent 749eef2232
commit a55d0ab478
9 changed files with 99 additions and 38 deletions

View File

@ -12,12 +12,12 @@ import {IonicComponent} from 'ionic2/config/component'
@Template({
inline: `
<header class="toolbar-container">
<!-- COLLECTION OF TOOLBARS FOR EACH OF ITS VIEWS WITHIN THIS NAV-VIEWPORT -->
<!-- COLLECTION OF TOOLBARS FOR EACH VIEW WITHIN EACH TAB-VIEWPORT -->
<!-- TOOLBARS FOR EACH VIEW SHOULD HAVE THE SAME CONTEXT AS ITS VIEW -->
</header>
<nav class="tab-bar">
<div class="tab-bar-container">
<nav class="tab-bar-container">
<div class="tab-bar">
<a *for="#tab of tabs"
class="tab-bar-item"
[class.tab-active]="tab.isSelected"
@ -47,6 +47,14 @@ export class Tabs {
this.domElement.classList.add('nav-pane-cover-parent')
// .tab-bar-top/bottom should be added to the entire element when specified
// TODO: MAKE MORE GOOD!!!
setTimeout(() => {
if (this.placement == 'top') {
this.domElement.classList.add('tab-bar-top')
} else {
this.domElement.classList.add('tab-bar-bottom')
}
})
this.config = Tabs.config.invoke(this)
this.tabs = []