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

Side by Side Diff: lib/paper_badge.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month 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
« no previous file with comments | « lib/neon_animated_pages.dart ('k') | lib/paper_badge.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update`
2 2
3 /// Dart API for the polymer element `paper_badge`. 3 /// Dart API for the polymer element `paper_badge`.
4 @HtmlImport('paper_badge_nodart.html') 4 @HtmlImport('paper_badge_nodart.html')
5 library polymer_elements.lib.src.paper_badge.paper_badge; 5 library polymer_elements.lib.src.paper_badge.paper_badge;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:js' show JsArray, JsObject; 8 import 'dart:js' show JsArray, JsObject;
9 import 'package:web_components/web_components.dart'; 9 import 'package:web_components/web_components.dart';
10 import 'package:polymer_interop/polymer_interop.dart'; 10 import 'package:polymer_interop/polymer_interop.dart';
11 import 'iron_resizable_behavior.dart'; 11 import 'iron_resizable_behavior.dart';
12 import 'iron_flex_layout.dart'; 12 import 'iron_flex_layout.dart';
13 import 'default_theme.dart'; 13 import 'default_theme.dart';
14 14
15 /// `<paper-badge>` is a circular text badge that is displayed on the top right 15 /// `<paper-badge>` is a circular text badge that is displayed on the top right
16 /// corner of an element, representing a status or a notification. It will badge 16 /// corner of an element, representing a status or a notification. It will badge
17 /// the anchor element specified in the `for` attribute, or, if that doesn't exi st, 17 /// the anchor element specified in the `for` attribute, or, if that doesn't exi st,
18 /// centered to the parent node containing it. 18 /// centered to the parent node containing it.
19 /// 19 ///
20 /// Example: 20 /// Example:
21 /// 21 ///
22 /// <div style="display:inline-block"> 22 /// <div style="display:inline-block">
23 /// <span>Inbox</span> 23 /// <span>Inbox</span>
24 /// <paper-badge label="3"></paper-badge> 24 /// <paper-badge label="3"></paper-badge>
25 /// </div> 25 /// </div>
26 /// 26 ///
27 /// <div> 27 /// <div>
28 /// <paper-button id="btn">Status</button> 28 /// <paper-button id="btn">Status</paper-button>
29 /// <paper-badge for="btn" label="♥︎">b/paper-badge> 29 /// <paper-badge for="btn" label="♥︎"></paper-badge>
30 /// </div> 30 /// </div>
31 /// 31 ///
32 /// ### Styling 32 /// ### Styling
33 /// 33 ///
34 /// The following custom properties and mixins are available for styling: 34 /// The following custom properties and mixins are available for styling:
35 /// 35 ///
36 /// Custom property | Description | Default 36 /// Custom property | Description | Default
37 /// ----------------|-------------|---------- 37 /// ----------------|-------------|----------
38 /// `--paper-badge-background` | The background color of the badge | `--accent-c olor` 38 /// `--paper-badge-background` | The background color of the badge | `--accent-c olor`
39 /// `--paper-badge-opacity` | The opacity of the badge | `1.0` 39 /// `--paper-badge-opacity` | The opacity of the badge | `1.0`
(...skipping 27 matching lines...) Expand all
67 /// automatically when the badge is attached or an `iron-resize` event is 67 /// automatically when the badge is attached or an `iron-resize` event is
68 /// fired (for exmaple if the window has resized, or your target is a 68 /// fired (for exmaple if the window has resized, or your target is a
69 /// custom element that implements IronResizableBehavior). 69 /// custom element that implements IronResizableBehavior).
70 /// 70 ///
71 /// You should call this in all other cases when the achor's position 71 /// You should call this in all other cases when the achor's position
72 /// might have changed (for example, if it's visibility has changed, or 72 /// might have changed (for example, if it's visibility has changed, or
73 /// you've manually done a page re-layout). 73 /// you've manually done a page re-layout).
74 updatePosition() => 74 updatePosition() =>
75 jsElement.callMethod('updatePosition', []); 75 jsElement.callMethod('updatePosition', []);
76 } 76 }
OLDNEW
« no previous file with comments | « lib/neon_animated_pages.dart ('k') | lib/paper_badge.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698