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

Side by Side Diff: polymer_0.5.0/bower_components/paper-menu-button/paper-menu-button.html

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 11 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 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
8 -->
9 <!--
10
11 `paper-menu-button` works together with a button and a `paper-dropdown` to
12 implement a button that displays a drop-down when tapped on.
13
14 The child element with the class `dropdown` will be used as the drop-down
15 menu. It should be a `paper-dropdown` or other overlay element.
16
17 Example:
18
19 <paper-menu-button>
20 <paper-icon-button icon="menu" noink></paper-icon-button>
21 <paper-dropdown class="dropdown">
22 <core-menu class="menu">
23 <paper-item>Share</paper-item>
24 <paper-item>Settings</paper-item>
25 <paper-item>Help</paper-item>
26 </core-menu>
27 </paper-dropdown>
28 </paper-menu-button>
29
30 @group Paper Elements
31 @element paper-menu-button
32 @extends core-dropdown-base
33 @status unstable
34 -->
35 <link href="../polymer/polymer.html" rel="import">
36 <link href="../core-a11y-keys/core-a11y-keys.html" rel="import">
37 <link href="../core-dropdown/core-dropdown-base.html" rel="import">
38
39 <polymer-element name="paper-menu-button" extends="core-dropdown-base" relative>
40 <template>
41
42 <style>
43 :host {
44 display: inline-block;
45 }
46
47 :host([disabled]) {
48 pointer-events: none;
49 color: #a8a8a8;
50 }
51
52 polyfill-next-selector { content: ':host([disabled]) *'; }
53 :host([disabled]) ::content * {
54 pointer-events: none;
55 }
56 </style>
57
58 <core-a11y-keys target="{{}}" keys="enter space" on-keys-pressed="{{toggleOver lay}}"></core-a11y-keys>
59
60 <content></content>
61
62 </template>
63 <script>
64
65 Polymer({
66
67 overlayListeners: {
68 'core-overlay-open': 'openAction',
69 'core-activate': 'activateAction'
70 },
71
72 activateAction: function() {
73 this.opened = false;
74 }
75
76 });
77
78 </script>
79 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698