55 lines
1.7 KiB
HTML
55 lines
1.7 KiB
HTML
<!DOCTYPE html>
|
|
<!--
|
|
@license
|
|
Copyright (c) 2014 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 lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title></title>
|
|
<script src="../webcomponentsjs/webcomponents.js"></script>
|
|
<link rel="import" href="paper-spinner.html">
|
|
<style shim-shadowdom>
|
|
paper-spinner.blue::shadow .circle {
|
|
border-color: #4285f4;
|
|
}
|
|
|
|
paper-spinner.red::shadow .circle {
|
|
border-color: #db4437;
|
|
}
|
|
|
|
paper-spinner.yellow::shadow .circle {
|
|
border-color: #f4b400;
|
|
}
|
|
|
|
paper-spinner.green::shadow .circle {
|
|
border-color: #0f9d58;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<template is="auto-binding">
|
|
<paper-spinner class="blue" active></paper-spinner>
|
|
<paper-spinner class="red" active></paper-spinner>
|
|
<paper-spinner class="yellow" active></paper-spinner>
|
|
<paper-spinner class="green" active></paper-spinner>
|
|
<paper-spinner active></paper-spinner>
|
|
<button on-tap="{{toggle}}">Toggle</button>
|
|
</template>
|
|
<script>
|
|
var t = document.querySelector('template');
|
|
t.toggle = function() {
|
|
var spinners = document.querySelectorAll('paper-spinner');
|
|
Array.prototype.forEach.call(spinners, function(spinner) {
|
|
spinner.active = !spinner.active;
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|