refactor(tab): rename tab properties

This commit is contained in:
Adam Bradley
2018-03-28 10:12:04 -05:00
parent b1b3c19908
commit 0105a4ee47
13 changed files with 148 additions and 157 deletions

View File

@ -51,11 +51,11 @@ export class TabButton {
hostData() {
const selected = this.selected;
const tab = this.tab;
const hasTitle = !!tab.title;
const hasIcon = !!tab.icon;
const hasTitle = !!tab.tabTitle;
const hasIcon = !!tab.tabIcon;
const hasTitleOnly = (hasTitle && !hasIcon);
const hasIconOnly = (hasIcon && !hasTitle);
const hasBadge = !!tab.badge;
const hasBadge = !!tab.tabBadge;
return {
'role': 'tab',
'id': tab.btnId,
@ -84,9 +84,9 @@ export class TabButton {
class='tab-cover'
onKeyUp={this.onKeyUp.bind(this)}
onBlur={this.onBlur.bind(this)}>
{ tab.icon && <ion-icon class='tab-button-icon' name={tab.icon}></ion-icon> }
{ tab.title && <span class='tab-button-text'>{tab.title}</span> }
{ tab.badge && <ion-badge class='tab-badge' color={tab.badgeStyle}>{tab.badge}</ion-badge> }
{ tab.tabIcon && <ion-icon class='tab-button-icon' name={tab.tabIcon}></ion-icon> }
{ tab.tabTitle && <span class='tab-button-text'>{tab.tabTitle}</span> }
{ tab.tabBadge && <ion-badge class='tab-badge' color={tab.tabBadgeStyle}>{tab.tabBadge}</ion-badge> }
{ this.mode === 'md' && <ion-ripple-effect useTapClick={true}/> }
</a>
];