mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
icon and item docs wip
This commit is contained in:
@ -6,6 +6,9 @@ import {Ion} from '../ion';
|
||||
import {Button} from '../button/button';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'icon',
|
||||
properties: [
|
||||
@ -20,6 +23,13 @@ import {Button} from '../button/button';
|
||||
}
|
||||
})
|
||||
export class Icon {
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
* @param {Button} hostButton TODO
|
||||
* @param {IonicConfig} config TODO
|
||||
* @param {Renderer} renderer TODO
|
||||
*/
|
||||
constructor(
|
||||
private elementRef: ElementRef,
|
||||
@Optional() @Host() hostButton: Button,
|
||||
@ -61,6 +71,9 @@ export class Icon {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
onInit() {
|
||||
if (this.mode == 'ios' && this.ios) {
|
||||
this.name = this.ios;
|
||||
|
@ -1,6 +1,8 @@
|
||||
import {Directive, ElementRef} from 'angular2/angular2';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-item-group',
|
||||
host: {
|
||||
@ -8,12 +10,18 @@ import {Directive, ElementRef} from 'angular2/angular2';
|
||||
}
|
||||
})
|
||||
export class ItemGroup {
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
*/
|
||||
constructor(elementRef: ElementRef) {
|
||||
this.ele = elementRef.nativeElement;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-item-group-title',
|
||||
host: {
|
||||
@ -22,6 +30,10 @@ export class ItemGroup {
|
||||
}
|
||||
})
|
||||
export class ItemGroupTitle {
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
*/
|
||||
constructor(elementRef: ElementRef) {
|
||||
this.isSticky = true;
|
||||
this.ele = elementRef.nativeElement;
|
||||
|
@ -1,13 +1,17 @@
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Decorator({
|
||||
selector: 'ion-primary-options'
|
||||
})
|
||||
export class ItemPrimaryOptions {
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Decorator({
|
||||
selector: 'ion-secondary-options'
|
||||
})
|
||||
export class ItemSecondaryOptions {
|
||||
}
|
||||
|
||||
|
@ -3,11 +3,18 @@ import {ElementRef, Host, Directive} from 'angular2/angular2';
|
||||
import {Item} from 'ionic/components/item/item';
|
||||
import {SlideGesture} from 'ionic/gestures/slide-gesture';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-primary-swipe-buttons'
|
||||
})
|
||||
export class ItemPrimarySwipeButtons {
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
* @param {Item} item TODO
|
||||
*/
|
||||
constructor(
|
||||
elementRef: ElementRef,
|
||||
@Host() item: Item
|
||||
@ -19,6 +26,10 @@ export class ItemPrimarySwipeButtons {
|
||||
this.gesture.listen();
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
* @param {boolean} isOpen TODO
|
||||
*/
|
||||
setOpen(isOpen) {
|
||||
if (isOpen !== this.isOpen) {
|
||||
this.isOpen = isOpen;
|
||||
@ -29,6 +40,9 @@ export class ItemPrimarySwipeButtons {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-secondary-swipe-buttons'
|
||||
})
|
||||
|
@ -4,7 +4,9 @@ import {ItemPrimaryOptions, ItemSecondaryOptions} from './item-options';
|
||||
import {ItemPrimarySwipeButtons, ItemSecondarySwipeButtons} from './item-swipe-buttons';
|
||||
import {dom} from 'ionic/util';
|
||||
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ion-item,[ion-item]',
|
||||
host: {
|
||||
@ -21,6 +23,10 @@ import {dom} from 'ionic/util';
|
||||
directives: [NgIf]
|
||||
})
|
||||
export class Item {
|
||||
/**
|
||||
* TODO
|
||||
* @param {ElementRef} elementRef TODO
|
||||
*/
|
||||
constructor(elementRef: ElementRef) {
|
||||
this._isOpen = false;
|
||||
this._isSlideActive = false;
|
||||
|
Reference in New Issue
Block a user