开源软件名称(OpenSource Name):PolymerElements/paper-drawer-panel开源软件地址(OpenSource Url):https://github.com/PolymerElements/paper-drawer-panel开源编程语言(OpenSource Language):JavaScript 62.5%开源软件介绍(OpenSource Introduction):<paper-drawer-panel>This element has been deprecated in favor of app-layout.
Use the attribute Example:
The drawer and the main panels are not scrollable. You can set CSS overflow
property on the elements to make them scrollable or use Example:
To position the drawer to the right, add
StylingTo change the main container:
To change the drawer container when it's in the left side:
To change the drawer container when it's in the right side:
To customize the scrim:
The following custom properties and mixins are available for styling:
See: Documentation, Demo. UsageInstallation
In an html file<html>
<head>
<script type="module">
import '@polymer/paper-drawer-panel/paper-drawer-panel.js';
</script>
</head>
<body>
<paper-drawer-panel>
<div slot="drawer"> Drawer panel... </div>
<div slot="main"> Main panel... </div>
</paper-drawer-panel>
</body>
</html> In a Polymer 3 elementimport {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-drawer-panel/paper-drawer-panel.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-drawer-panel>
<div slot="drawer"> Drawer panel... </div>
<div slot="main"> Main panel... </div>
</paper-drawer-panel>
`;
}
}
customElements.define('sample-element', SampleElement); ContributingIf you want to send a PR to this element, here are the instructions for running the tests and demo locally: Installationgit clone https://github.com/PolymerElements/paper-drawer-panel
cd paper-drawer-panel
npm install
npm install -g polymer-cli Running the demo locallypolymer serve --npm
open http://127.0.0.1:<port>/demo/ Running the testspolymer test --npm |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论