api-console-assets
Version:
This repo only exists to publish api console components to npm
71 lines (54 loc) • 1.97 kB
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>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<title>app-drawer demo</title>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../../font-roboto/roboto.html">
<link rel="import" href="../../../iron-icons/iron-icons.html">
<link rel="import" href="../../../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../../demo/sample-content.html">
<link rel="import" href="../../app-toolbar/app-toolbar.html">
<link rel="import" href="../app-drawer.html">
<style is="custom-style">
body {
margin: 0;
font-family: 'Roboto', 'Noto', sans-serif;
background-color: #eee;
}
app-toolbar {
background-color: #4285f4;
color: #fff;
}
app-drawer {
--app-drawer-scrim-background: rgba(0, 0, 100, 0.8);
--app-drawer-content-container: {
background-color: #B0BEC5;
}
}
</style>
</head>
<body>
<app-toolbar>
<paper-icon-button icon="menu"></paper-icon-button>
</app-toolbar>
<sample-content size="100"></sample-content>
<app-drawer swipe-open></app-drawer>
<script>
var drawer = document.querySelector('app-drawer');
document.querySelector('paper-icon-button').addEventListener('tap', function() {
drawer.toggle();
});
</script>
</body>
</html>