Skip to content

Commit d23df42

Browse files
committed
docs(demos): add input and textarea demos
references ionic-team/ionic-site#397
1 parent f25f316 commit d23df42

File tree

5 files changed

+83
-0
lines changed

5 files changed

+83
-0
lines changed

demos/input/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {App} from 'ionic/ionic';
2+
3+
@App({
4+
templateUrl: 'main.html'
5+
})
6+
class ApiDemoApp {}

demos/input/main.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<ion-toolbar>
2+
<ion-title>Input</ion-title>
3+
</ion-toolbar>
4+
5+
<ion-content>
6+
<ion-list>
7+
<ion-item>
8+
<ion-label primary>Inline Label</ion-label>
9+
<ion-input placeholder="Text Input"></ion-input>
10+
</ion-item>
11+
12+
<ion-item>
13+
<ion-label primary fixed>Fixed Label</ion-label>
14+
<ion-input type="tel" placeholder="Tel Input"></ion-input>
15+
</ion-item>
16+
17+
<ion-item>
18+
<ion-input type="number" placeholder="Number Input with no label"></ion-input>
19+
</ion-item>
20+
21+
<ion-item>
22+
<ion-label primary stacked>Stacked Label</ion-label>
23+
<ion-input type="email" placeholder="Email Input"></ion-input>
24+
</ion-item>
25+
26+
<ion-item>
27+
<ion-label primary stacked>Stacked Label</ion-label>
28+
<ion-input type="password" placeholder="Password Input"></ion-input>
29+
</ion-item>
30+
31+
<ion-item>
32+
<ion-label primary floating>Floating Label</ion-label>
33+
<ion-input></ion-input>
34+
</ion-item>
35+
36+
</ion-list>
37+
</ion-content>

demos/textarea/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {App} from 'ionic/ionic';
2+
3+
@App({
4+
templateUrl: 'main.html'
5+
})
6+
class ApiDemoApp {}

demos/textarea/main.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<ion-toolbar>
2+
<ion-title>Textarea</ion-title>
3+
</ion-toolbar>
4+
5+
<ion-content>
6+
<ion-list>
7+
<ion-item>
8+
<ion-label primary>Inline Label</ion-label>
9+
<ion-textarea placeholder="Textarea"></ion-textarea>
10+
</ion-item>
11+
12+
<ion-item>
13+
<ion-label primary fixed>Fixed Label</ion-label>
14+
<ion-textarea placeholder="Textarea"></ion-textarea>
15+
</ion-item>
16+
17+
<ion-item>
18+
<ion-textarea placeholder="Textarea with no label"></ion-textarea>
19+
</ion-item>
20+
21+
<ion-item>
22+
<ion-label primary stacked>Stacked Label</ion-label>
23+
<ion-textarea placeholder="Textarea"></ion-textarea>
24+
</ion-item>
25+
26+
<ion-item>
27+
<ion-label primary floating>Floating Label</ion-label>
28+
<ion-textarea></ion-textarea>
29+
</ion-item>
30+
31+
</ion-list>
32+
</ion-content>

ionic/components/input/input.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import {Platform} from '../../platform/platform';
6060
* </ion-item>
6161
* ```
6262
*
63+
* @demo /docs/v2/demos/input/
6364
*/
6465
@Component({
6566
selector: 'ion-input',
@@ -128,6 +129,7 @@ export class TextInput extends InputBase {
128129
* </ion-item>
129130
* ```
130131
*
132+
* @demo /docs/v2/demos/textarea/
131133
*/
132134
@Component({
133135
selector: 'ion-textarea',

0 commit comments

Comments
 (0)