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

Side by Side Diff: third_party/polymer/v0_8/components/paper-input/paper-input-error.html

Issue 1082403004: Import Polymer 0.8 and several key elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also remove polymer/explainer Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!--
2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 -->
10
11 <link rel="import" href="../polymer/polymer.html">
12 <link rel="import" href="../paper-styles/paper-styles.html">
13
14 <!--
15 `<paper-input-error>` is an error message for use with `<paper-input-container>` .
16 -->
17 <dom-module id="paper-input-error">
18
19 <style>
20
21 :host {
22 /* need to use display: none for role="alert" */
23 display: none;
24 float: left;
25
26 color: var(--paper-input-container-invalid-color);
27
28 mixin(--paper-input-container-add-on);
29 mixin(--paper-input-container-add-on-font);
30
31 mixin(--paper-input-error);
32 }
33
34 :host([invalid]) {
35 display: inline-block;
36 };
37
38 </style>
39
40 <template>
41
42 <content></content>
43
44 </template>
45
46 </dom-module>
47
48 <script>
49
50 (function() {
51
52 Polymer({
53
54 is: 'paper-input-error',
55
56 enableCustomStyleProperties: true,
57
58 hostAttributes: {
59 'add-on': '',
60 'role': 'alert'
61 },
62
63 properties: {
64
65 /**
66 * Set to true to show the error.
67 */
68 invalid: {
69 reflectToAttribute: true,
70 type: Boolean
71 }
72
73 },
74
75 attached: function() {
76 this.fire('addon-attached');
77 }
78
79 })
80
81 })();
82
83 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698