OLD | NEW |
1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
3 found in the LICENSE file. --> | 3 found in the LICENSE file. --> |
4 | 4 |
5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
7 | 7 |
8 <!-- | 8 <!-- |
9 A simple input form with a button. Being used for typing email or password. | 9 A simple input form with a button. Being used for typing email or password. |
10 User should put one or more <gaia-input>s inside. | 10 User should put one or more <gaia-input>s inside. |
11 | 11 |
12 Example: | 12 Example: |
13 <gaia-input-form button-text="Submit"> | 13 <gaia-input-form button-text="Submit"> |
14 <gaia-input label="Email" type="email"></gaia-input> | 14 <gaia-input label="Email" type="email"></gaia-input> |
15 <gaia-input label="Password" type="password"></gaia-input> | 15 <gaia-input label="Password" type="password"></gaia-input> |
16 <gaia-input label="OTP"></gaia-input> | 16 <gaia-input label="OTP"></gaia-input> |
17 </gaia-input-form> | 17 </gaia-input-form> |
18 | 18 |
19 Attributes: | 19 Attributes: |
20 'button-text' - text on the button. | 20 'button-text' - text on the button. |
21 | 21 |
22 Events: | 22 Events: |
23 'submit' - fired on button click or "Enter" press inside input field. | 23 'submit' - fired on button click or "Enter" press inside input field. |
24 | 24 |
25 --> | 25 --> |
26 <dom-module name="gaia-input-form"> | 26 <dom-module id="gaia-input-form"> |
27 <link rel="stylesheet" href="gaia_input_form.css"> | 27 <link rel="stylesheet" href="gaia_input_form.css"> |
28 | 28 |
29 <template> | 29 <template> |
30 <div on-keydown="onKeyDown_"> | 30 <div on-keydown="onKeyDown_"> |
31 <content id="inputs" select="gaia-input"></content> | 31 <content id="inputs" select="gaia-input"></content> |
32 <div class="horizontal-reverse justified layout center"> | 32 <div class="horizontal-reverse justified layout center"> |
33 <gaia-button id="button" on-tap="onButtonClicked_" class="self-end"> | 33 <gaia-button id="button" on-tap="onButtonClicked_" class="self-end"> |
34 <span>[[buttonText]]</span> | 34 <span>[[buttonText]]</span> |
35 </gaia-button> | 35 </gaia-button> |
36 <content> </content> | 36 <content> </content> |
37 </div> | 37 </div> |
38 </div> | 38 </div> |
39 </template> | 39 </template> |
40 </dom-module> | 40 </dom-module> |
OLD | NEW |