mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
@ -20,7 +20,7 @@
|
||||
<ion-label>From</ion-label>
|
||||
<input value="Text 3" type="text">
|
||||
<button clear item-right>
|
||||
<icon power></icon>
|
||||
<ion-icon name="power"></ion-icon>
|
||||
</button>
|
||||
</ion-input>
|
||||
|
||||
@ -30,25 +30,25 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input fixed-label>
|
||||
<icon globe item-left></icon>
|
||||
<ion-icon name="globe" item-left></ion-icon>
|
||||
<ion-label>Website</ion-label>
|
||||
<input value="http://ionic.io/" type="url">
|
||||
</ion-input>
|
||||
|
||||
<ion-input fixed-label>
|
||||
<icon mail item-left></icon>
|
||||
<ion-icon name="mail" item-left></ion-icon>
|
||||
<ion-label>Email</ion-label>
|
||||
<input value="email6@email.com" type="email">
|
||||
</ion-input>
|
||||
|
||||
<ion-input fixed-label>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<ion-label>Phone</ion-label>
|
||||
<input value="867-5309" type="tel">
|
||||
</ion-input>
|
||||
|
||||
<ion-input fixed-label>
|
||||
<icon contact item-left></icon>
|
||||
<ion-icon name="contact" item-left></ion-icon>
|
||||
<input placeholder="Placeholder Text" type="text">
|
||||
</ion-input>
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input fixed-label>
|
||||
<icon create item-left></icon>
|
||||
<ion-icon name="create" item-left></ion-icon>
|
||||
<ion-label>Message</ion-label>
|
||||
<textarea>To infinity and beyond</textarea>
|
||||
</ion-input>
|
||||
|
@ -22,7 +22,7 @@
|
||||
<ion-label>From:</ion-label>
|
||||
<input value="Text 3" type="text">
|
||||
<button clear item-right>
|
||||
<icon power></icon>
|
||||
<ion-icon name="power"></ion-icon>
|
||||
</button>
|
||||
</ion-input>
|
||||
|
||||
@ -32,19 +32,19 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon globe item-left></icon>
|
||||
<ion-icon name="globe" item-left></ion-icon>
|
||||
<ion-label>Website:</ion-label>
|
||||
<input value="http://ionic.io/" type="url">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon mail item-left></icon>
|
||||
<ion-icon name="mail" item-left></ion-icon>
|
||||
<ion-label>Email:</ion-label>
|
||||
<input value="email6@email.com" type="email">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon create item-left></icon>
|
||||
<ion-icon name="create" item-left></ion-icon>
|
||||
<ion-label>Feedback:</ion-label>
|
||||
<textarea placeholder="Placeholder Text"></textarea>
|
||||
</ion-input>
|
||||
@ -52,7 +52,7 @@
|
||||
<ion-input>
|
||||
<ion-label>More Info:</ion-label>
|
||||
<input placeholder="Placeholder Text" type="text">
|
||||
<icon flag item-right></icon>
|
||||
<ion-icon name="flag" item-right></ion-icon>
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
|
@ -38,7 +38,7 @@
|
||||
<ion-label>Text 3:</ion-label>
|
||||
<input type="text">
|
||||
<button clear item-right>
|
||||
<icon power></icon>
|
||||
<ion-icon name="power"></ion-icon>
|
||||
</button>
|
||||
</ion-input>
|
||||
|
||||
@ -48,19 +48,19 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon globe item-left></icon>
|
||||
<ion-icon name="globe" item-left></ion-icon>
|
||||
<ion-label>Website:</ion-label>
|
||||
<input value="http://ionic.io/" type="url">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon mail item-left></icon>
|
||||
<ion-icon name="mail" item-left></ion-icon>
|
||||
<ion-label>Email:</ion-label>
|
||||
<input value="email6@email.com" type="email">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon create item-left></icon>
|
||||
<ion-icon name="create" item-left></ion-icon>
|
||||
<ion-label>Feedback:</ion-label>
|
||||
<textarea placeholder="Placeholder Text"></textarea>
|
||||
</ion-input>
|
||||
@ -72,7 +72,7 @@
|
||||
<ion-input>
|
||||
<ion-label>More Info:</ion-label>
|
||||
<input placeholder="Placeholder Text" type="text">
|
||||
<icon flag item-right></icon>
|
||||
<ion-icon name="flag" item-right></ion-icon>
|
||||
</ion-input>
|
||||
|
||||
<ion-checkbox>
|
||||
|
@ -1,5 +1,7 @@
|
||||
|
||||
<ion-toolbar><ion-title>Inset Inputs</ion-title></ion-toolbar>
|
||||
<ion-toolbar>
|
||||
<ion-title>Inset Inputs</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
|
||||
<ion-content class="outer-content">
|
||||
@ -8,17 +10,17 @@
|
||||
<ion-list inset>
|
||||
|
||||
<ion-input>
|
||||
<icon search item-left></icon>
|
||||
<ion-icon name="search" item-left></ion-icon>
|
||||
<input value="Input inside an inset list" type="text">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<input type="tel">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon mail item-left></icon>
|
||||
<ion-icon name="mail" item-left></ion-icon>
|
||||
<input placeholder="Placeholder text" type="text">
|
||||
</ion-input>
|
||||
|
||||
@ -28,13 +30,13 @@
|
||||
<ion-list inset>
|
||||
|
||||
<ion-input inset>
|
||||
<icon search item-left></icon>
|
||||
<ion-icon name="search" item-left></ion-icon>
|
||||
<input value="Inset input inside an inset list" type="text">
|
||||
</ion-input>
|
||||
|
||||
<ion-input inset>
|
||||
<input value="Inset input inside an inset list" type="text">
|
||||
<icon mic item-right></icon>
|
||||
<ion-icon name="mic" item-right></ion-icon>
|
||||
</ion-input>
|
||||
|
||||
</ion-list>
|
||||
@ -43,7 +45,7 @@
|
||||
<ion-list>
|
||||
|
||||
<ion-input inset>
|
||||
<icon search item-left></icon>
|
||||
<ion-icon name="search" item-left></ion-icon>
|
||||
<input value="Inset input inside a list" type="text">
|
||||
<button outline item-right>Search</button>
|
||||
</ion-input>
|
||||
@ -54,13 +56,13 @@
|
||||
<ion-card>
|
||||
|
||||
<ion-input>
|
||||
<icon search item-left></icon>
|
||||
<ion-icon name="search" item-left></ion-icon>
|
||||
<input value="Input inside a card" type="text">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<input value="Input inside a card" type="text">
|
||||
<icon mic item-right></icon>
|
||||
<ion-icon name="mic" item-right></ion-icon>
|
||||
</ion-input>
|
||||
|
||||
</ion-card>
|
||||
|
@ -15,12 +15,12 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<input placeholder="Text Input Placeholder" type="text">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<input placeholder="Text Input Placeholder" value="Text Input Value" type="text">
|
||||
</ion-input>
|
||||
|
||||
@ -45,12 +45,12 @@
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<input placeholder="Inset List: Text Input Placeholder" type="text">
|
||||
</ion-input>
|
||||
|
||||
<ion-input>
|
||||
<icon call item-left></icon>
|
||||
<ion-icon name="call" item-left></ion-icon>
|
||||
<input placeholder="Inset List: Text Input Placeholder" value="Inset List: Text Input Value" type="text">
|
||||
</ion-input>
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user