Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: ui/webui/resources/cr_elements/cr_input/cr_input.html

Issue 918913002: Add a <cr-input> element to cr_elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/webui/resources/cr_elements/cr_input/cr_input.html
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input.html b/ui/webui/resources/cr_elements/cr_input/cr_input.html
new file mode 100644
index 0000000000000000000000000000000000000000..0732511b9397ac3f90f2246f76f6011f9018d222
--- /dev/null
+++ b/ui/webui/resources/cr_elements/cr_input/cr_input.html
@@ -0,0 +1,19 @@
+<link rel="import" href="chrome://resources/polymer/polymer/polymer.html">
+<link rel="import"
+ href="chrome://resources/polymer/paper-input/paper-input-decorator.html">
+<link rel="import" href="chrome://resources/polymer/core-input/core-input.html">
+<link rel="import" href="chrome://resources/cr_elements/cr_events/cr_events.html">
michaelpg 2015/02/13 00:08:29 nit: let's be consistent in wrapping
Jeremy Klein 2015/02/13 00:22:54 Done.
+
+<polymer-element name="cr-input">
+ <template>
+ <link rel="stylesheet" href="cr_input.css">
+ <cr-events id="events"></cr-events>
+
+ <paper-input-decorator id="decorator" label="{{label}}" floatingLabel="{{floatingLabel}}"
michaelpg 2015/02/13 00:08:28 nit: 12, 14, 15 should be limited to 80 chars wide
michaelpg 2015/02/13 00:08:29 we use {{ spaces }} inside data-binding braces
Jeremy Klein 2015/02/13 00:22:54 Where did this convention come from? This isn't do
Jeremy Klein 2015/02/13 00:22:55 Waiting on verification about 80-char limit. If we
michaelpg 2015/02/13 05:45:13 Hmm, I guess the truth is *I* use {{ spaces }} ins
michaelpg 2015/02/18 00:17:18 ping on this nit
Jeremy Klein 2015/02/18 01:10:49 Done.
+ value="{{value}}" disabled?="{{disabled}}" error="{{error}}">
+ <input is="core-input" id="input" value="{{value}}" committedValue="{{committedValue}}"
+ disabled?="{{disabled}}" required="{{required}}" pattern="{{pattern}}" type="{{type}}">
+ </paper-input-decorator>
+ </template>
+ <script src="cr_input.js"></script>
+</polymer-element>

Powered by Google App Engine
This is Rietveld 408576698