-
Notifications
You must be signed in to change notification settings - Fork 44
/
index.html
116 lines (111 loc) · 4.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!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.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
-->
<html>
<head>
<title>paper-icon-button demo</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@^2.0.0/webcomponents-loader.js"></script>
<script type="module">
import '@polymer/iron-icons/iron-icons.js';
import '@polymer/paper-styles/color.js';
import '@polymer/iron-demo-helpers/demo-snippet.js';
import '@polymer/iron-demo-helpers/demo-pages-shared-styles.js';
import '../paper-icon-button.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
const template = html`
<custom-style>
<style is="custom-style" include="demo-pages-shared-styles">
paper-icon-button {
margin-left: 10px;
margin-right: 10px;
}
</style>
</custom-style>
`;
document.body.appendChild(template.content);
</script>
</head>
<body unresolved>
<div class="vertical-section-container centered">
<h3>Buttons can use iron-icons or external images, and can be disabled</h3>
<demo-snippet class="centered-demo">
<template>
<paper-icon-button icon="favorite" title="heart"></paper-icon-button>
<paper-icon-button src="https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" alt="octocat" title="octocat"></paper-icon-button>
<paper-icon-button disabled icon="reply" title="reply"></paper-icon-button>
</template>
</demo-snippet>
<h3>Buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
<demo-snippet class="centered-demo">
<template>
<paper-icon-button noink icon="find-in-page" title="find"></paper-icon-button>
</template>
</demo-snippet>
<h3>Buttons can be styled using regular CSS and custom properties</h3>
<demo-snippet class="centered-demo">
<template>
<custom-style>
<style is="custom-style">
paper-icon-button.pink {
color: var(--paper-pink-500);
--paper-icon-button-ink-color: var(--paper-indigo-500);
}
paper-icon-button.pink:hover {
background-color: var(--paper-pink-500);
color: white;
}
paper-icon-button.blue {
--paper-icon-button-ink-color: var(--paper-orange-500);
background-color: var(--paper-light-blue-500);
color: white;
border-radius: 3px;
padding: 2px;
}
</style>
</custom-style>
<paper-icon-button icon="favorite" title="heart" class="pink"></paper-icon-button>
<paper-icon-button icon="flight-takeoff" title="take off" class="blue"></paper-icon-button>
</template>
</demo-snippet>
<h3>Buttons can be resized</h3>
<demo-snippet class="centered-demo">
<template>
<custom-style>
<style is="custom-style">
paper-icon-button.giant {
width: 100px;
height: 100px;
}
</style>
</custom-style>
<paper-icon-button icon="alarm-on" title="wake up" class="giant"></paper-icon-button>
</template>
</demo-snippet>
<h3>Buttons can be used as a link</h3>
<demo-snippet class="centered-demo">
<template>
<a href="https://www.polymer-project.org" tabindex="-1">
<paper-icon-button icon="polymer"></paper-icon-button>
</a>
<custom-style>
<style is="custom-style">
a paper-icon-button,
a:active paper-icon-button,
a:visited paper-icon-button {
color: #000000;
}
</style>
</custom-style>
</template>
</demo-snippet>
</div>
</body>
</html>