Polymer-paper-icon-button

提供:Dev Guides
移動先:案内検索

ポリマー-紙アイコンボタン

Paper-icon-buttonはアクションボタンで、設定などの特定のアクションを表します。 ユーザーがボタンに触れると、波及効果があります。 これらのボタンをリンクとして使用するか、次の例に示すようにボタンにスタイルを設定できます。 ディレクトリでpaper-icon-buttonとiron-iconsを取得するには、動作状態でコマンドプロンプトで次のコマンドを実行する必要があります。

bower install --save PolymerElements/paper-icon-button

インデックスファイルは次のようになります。

<!doctype html>
<html>
   <head>
      <link rel = 'import' href = 'my-appl'>
   </head>

   <body>
      <my-app></my-app>
   </body>
</html>

my-appleファイルは次のようになります。

<link rel = 'import' href = 'bower_components/polymer/polymerl'>
<link rel = "import" href = "bower_components/iron-icons/iron-iconsl">
<link rel = "import" href = "bower_components/paper-icon-button/paper-icon-buttonl">

<dom-module id = 'my-app'>
   <template>
      <h3>Paper-Icon-Button Example </h3>
      <paper-icon-button icon = "settings" ></paper-icon-button>settings
      <br>
      <paper-icon-button icon = "warning" style = "color: red;" ></paper-icon-button>warning
      <br>
      <paper-icon-button icon = "content-cut" ></paper-icon-button>content-cut
      <br>
      <paper-icon-button icon = "dashboard" ></paper-icon-button>dashboard
      <br>
      <paper-icon-button icon = "flight-takeoff" ></paper-icon-button>flight-takeoff
      <br>
   </template>

   <script>
      Polymer ({
         is: 'my-app',
         ready: function() {
            this.async(function() {
            });
         }
      });
   </script>
</dom-module>

出力

Polymerサーバーを更新すると、以下が出力されます。

paper-icon-button