index.html 3.48 KB
<!doctype html>
<!--
@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
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
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
-->
<html>
<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">

  <title>paper-fab demo</title>

  <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
  <link rel="import" href="../../paper-styles/color.html">
  <link rel="import" href="../../paper-styles/demo-pages.html">
  <link rel="import" href="../../iron-icons/iron-icons.html">
  <link rel="import" href="../paper-fab.html">

  <style is="custom-style">
    .horizontal-section {
      min-width: 200px;
    }

    paper-fab {
      display: block;
      margin-bottom:24px;
      margin-left: auto;
      margin-right: auto;
    }

    paper-fab.blue {
      --paper-fab-background: var(--paper-light-blue-500);
      --paper-fab-keyboard-focus-background: var(--paper-light-blue-900);
    }

    paper-fab.red {
      --paper-fab-background: var(--paper-red-500);
      --paper-fab-keyboard-focus-background: var(--paper-red-900);
    }

    paper-fab.green {
      --paper-fab-background: var(--paper-green-500);
      --paper-fab-keyboard-focus-background: var(--paper-green-900);
    }

    paper-fab.orange {
      --paper-fab-background: var(--paper-orange-500);
      --paper-fab-keyboard-focus-background: var(--paper-orange-900);
    }

  </style>

</head>
<body unresolved>
  <div class="horizontal-section-container">
    <div>
      <h4>Enabled</h4>
      <div class="horizontal-section">
        <paper-fab icon="arrow-forward" title="arrow-forward" tabindex="0"></paper-fab>
        <paper-fab icon="create" title="create" tabindex="0"></paper-fab>
        <paper-fab icon="favorite" title="heart" tabindex="0"></paper-fab>
        <paper-fab mini icon="done" title="done" tabindex="0"></paper-fab>
        <paper-fab mini icon="reply" title="reply" tabindex="0"></paper-fab>
      </div>
    </div>

    <div>
      <h4>Disabled</h4>
      <div class="horizontal-section">
        <paper-fab disabled icon="arrow-forward" title="arrow-forward" tabindex="0"></paper-fab>
        <paper-fab disabled icon="create" title="create" tabindex="0"></paper-fab>
        <paper-fab disabled icon="favorite" title="heart" tabindex="0"></paper-fab>
        <paper-fab disabled mini icon="done" title="done" tabindex="0"></paper-fab>
        <paper-fab disabled mini icon="reply" title="reply" tabindex="0"></paper-fab>
      </div>
    </div>

    <div>
      <h4>Colors</h4>
      <div class="horizontal-section">
        <paper-fab icon="arrow-forward" title="arrow-forward" tabindex="0" class="blue"></paper-fab>
        <paper-fab icon="create" title="create" tabindex="0" class="red"></paper-fab>
        <paper-fab icon="favorite" title="heart" tabindex="0" class="orange"></paper-fab>
        <paper-fab mini icon="done" title="done" tabindex="0" class="green"></paper-fab>
        <paper-fab mini icon="reply" title="reply" tabindex="0" class="blue"></paper-fab>
      </div>
    </div>
  </div>
</body>
</html>