4
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
Code distributed by Google as part of the polymer project is also
9
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
13
<title>paper-icon-button demo</title>
14
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
15
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
17
<link rel="import" href="../../iron-icons/iron-icons.html">
18
<link rel="import" href="../../paper-styles/color.html">
19
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
20
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
21
<link rel="import" href="../paper-icon-button.html">
23
<style is="custom-style" include="demo-pages-shared-styles">
31
<div class="vertical-section-container centered">
32
<h3>Buttons can use iron-icons or external images, and can be disabled</h3>
33
<demo-snippet class="centered-demo">
35
<paper-icon-button icon="favorite" title="heart"></paper-icon-button>
36
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
37
<paper-icon-button disabled icon="reply" title="reply"></paper-icon-button>
41
<h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
42
<demo-snippet class="centered-demo">
44
<paper-icon-button noink icon="find-in-page" title="find"></paper-icon-button>
48
<h3>Buttons can be styled using regular CSS and custom properties</h3>
49
<demo-snippet class="centered-demo">
51
<style is="custom-style">
52
paper-icon-button.pink {
53
color: var(--paper-pink-500);
54
--paper-icon-button-ink-color: var(--paper-indigo-500);
56
paper-icon-button.pink:hover {
57
background-color: var(--paper-pink-500);
60
paper-icon-button.blue {
61
--paper-icon-button-ink-color: var(--paper-orange-500);
62
background-color: var(--paper-light-blue-500);
68
<paper-icon-button icon="favorite" title="heart" class="pink"></paper-icon-button>
69
<paper-icon-button icon="flight-takeoff" title="take off" class="blue"></paper-icon-button>
73
<h3>Buttons can be resized</h3>
74
<demo-snippet class="centered-demo">
76
<style is="custom-style">
77
paper-icon-button.giant {
82
<paper-icon-button icon="alarm-on" title="wake up" class="giant"></paper-icon-button>
86
<h3>Buttons can be used as a link</h3>
87
<demo-snippet class="centered-demo">
89
<a href="https://www.polymer-project.org" tabindex="-1">
90
<paper-icon-button icon="polymer"></paper-icon-button>
94
a:active paper-icon-button,
95
a:visited paper-icon-button {