refactor(icon): rename icon to ion-icon

Closes #855
This commit is contained in:
Adam Bradley
2016-01-05 22:27:04 -06:00
parent 8987e4b932
commit 883e1b68b1
62 changed files with 307 additions and 303 deletions

View File

@ -1,4 +1,4 @@
import {Component, Directive, Attribute, forwardRef, Host, Optional, ElementRef, Renderer, Input, Output, EventEmitter, ContentChild, HostListener} from 'angular2/core';
import {Component, Directive, Attribute, forwardRef, Host, Optional, ElementRef, Renderer, Input, Output, EventEmitter, ContentChild, ContentChildren, HostListener} from 'angular2/core';
import {NgIf} from 'angular2/common';
import {NavController} from '../nav/nav-controller';
@ -10,6 +10,7 @@ import {Content} from '../content/content';
import {CSS, hasFocus, pointerCoord, hasPointerMoved} from '../../util/dom';
import {Platform} from '../../platform/platform';
import {Button} from '../button/button';
import {Icon} from '../icon/icon';
/**
@ -263,6 +264,28 @@ export class TextInput {
this.label = label;
}
/**
* @private
*/
@ContentChildren(Button)
set _buttons(buttons) {
buttons.toArray().forEach(button => {
if (!button.isItem) {
button.addClass('item-button');
}
});
}
/**
* @private
*/
@ContentChildren(Icon)
set _icons(icons) {
icons.toArray().forEach(icon => {
icon.addClass('item-icon');
});
}
/**
* @private
* On Initialization check for attributes