tabs-with-content-example.html 1.46 KB
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

<link rel="import" href="../paper-tabs.html">
<link rel="import" href="../paper-tab.html">

<link rel="import" href="../../iron-pages/iron-pages.html">
<link rel="import" href="paper-tabs-demo-styles.html">

<dom-module is="tabs-with-content-example">
  <template>
    <style include="paper-tabs-demo-styles"></style>
    <style>
      iron-pages {
        border: 1px solid #ccc;
        border-top: none;
        padding: 8px;
      }
    </style>
    <paper-tabs selected="{{selected}}">
      <paper-tab>ITEM ONE</paper-tab>
      <paper-tab>ITEM TWO</paper-tab>
      <paper-tab>ITEM THREE</paper-tab>
    </paper-tabs>
    <iron-pages selected="{{selected}}">
      <div>CONTENT ONE</div>
      <div>CONTENT TWO</div>
      <div>CONTENT THREE</div>
    </iron-pages>
  </template>
  <script>
    Polymer({
      is: 'tabs-with-content-example',
      properties: {
        selected: {
          type: Number,
          value: 0
        }
      }
    });
  </script>
</dom-module>