blob: b887708eee7776e799f2c52cef813286e1ff3546 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
<link rel="import" href="chrome://resources/polymer/polymer/polymer.html">
<link rel="import" href="chrome://resources/polymer/polymer/layout.html">
<!--
A simple input form with a button. Being used for typing email or password.
User should put one or more <gaia-input>s inside.
Example:
<gaia-input-form buttonText="Submit">
<gaia-input label="Email" type="email"></gaia-input>
<gaia-input label="Password" type="password"></gaia-input>
<gaia-input label="OTP"></gaia-input>
</gaia-input-form>
Attributes:
'buttonText' - text on the button.
Events:
'submit' - fired on button click or "Enter" press inside input field.
Methods:
'focus' - focuses input field.
-->
<polymer-element name="gaia-input-form" vertical start-justified layout
attributes="buttonText"
on-keydown="{{onKeyDown}}">
<template>
<link rel="stylesheet" href="gaia_input_form.css">
<content id="inputs" select="gaia-input"></content>
<div horizontal justified layout center reverse>
<gaia-raised-on-focus-button id="button" class="blue-button"
on-tap="{{onButtonClicked}}" self-end>
{{buttonText}}
</gaia-raised-on-focus-button>
<content> </content>
</div>
</template>
</polymer-element>
|