OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |