blob: eeb2b45d248a4fc77c96abc08bb8a6f1abdff6be [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright 2016 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/components/core-menu/core-menu.html">
<link rel="import" href="/components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="/components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="/components/paper-item/paper-item.html">
<polymer-element name="select-menu" attributes="menuItems">
<template>
<style>
</style>
<paper-dropdown-menu>
<paper-dropdown class="dropdown">
<core-menu class="menu" valueattr="label" id="menu">
<template repeat="{{menuItems}}">
<paper-item label="{{}}">{{}}</paper-item>
</template>
</core-menu>
</paper-dropdown>
</paper-dropdown-menu>
</template>
<script>
'use strict';
Polymer('select-menu', {
select: function(label) {
this.$.menu.selected = label;
},
get selected() {
return this.$.menu.selected;
}
});
</script>
</polymer-element>